From 0b9600c9ba3a249ec91cc5b1393e614c74927e2a Mon Sep 17 00:00:00 2001 From: Filipe Pina Date: Thu, 24 Jan 2019 03:58:10 +0000 Subject: [PATCH] pypi --- .gitignore | 6 ++++-- .travis.yml | 8 ++++++++ MANIFEST.in | 3 +++ Makefile | 8 +++++++- setup.py | 45 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 MANIFEST.in create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 66e5933..b3c77c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ -.coverage -.idea +/.coverage +/.idea *.pyc +/dist +/MANIFEST diff --git a/.travis.yml b/.travis.yml index 0ce4101..e26a872 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,3 +31,11 @@ jobs: script: - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - make travis-tag TAG=$TRAVIS_TAG + - echo $TRAVIS_TAG > VERSION + deploy: + provider: pypi + user: fopina + password: $PYPI_PASSWORD + skip_cleanup: true + on: + tags: true diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..389b286 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include LICENSE +include README.md +include VERSION diff --git a/Makefile b/Makefile index f786182..deaa8be 100644 --- a/Makefile +++ b/Makefile @@ -22,5 +22,11 @@ test: dockertest: build docker run --rm -ti $(IMAGE) -h +pypi: + python setup.py sdist upload -.PHONY: push build travis-dev travis-tag test dockertest \ No newline at end of file +pypitest: + python setup.py sdist upload -r https://test.pypi.org/legacy/ + + +.PHONY: push build travis-dev travis-tag test dockertest pypi pypitest \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..ce7c277 --- /dev/null +++ b/setup.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +from distutils.core import setup + +README = open('README.md').read() +try: + VERSION = open('VERSION').read().strip() +except IOError: + VERSION = 'dev' + +setup( + name='kdbxpasswordpwned', + version=VERSION, + description='Check KeePass passwords against https://haveibeenpwned.com/Passwords', + long_description_content_type='text/markdown', + long_description=README, + author='Filipe Pina', + author_email='fopina@skmobi.com', + url='https://github.com/fopina/kdbxpasswordpwned', + py_modules=['kdbxpasswordpwned'], + install_requires=[ + 'requests', + 'libkeepass', + ], + entry_points={ + 'console_scripts': ['kdbxpasswordpwned=kdbxpasswordpwned:main'] + }, + classifiers=[ + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.0', + 'Programming Language :: Python :: 3.1', + 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], + keywords=['keepass', 'hibp', 'password', 'data', 'breach', 'leak'] +)