From 3fb364b3e414915728b498af9708afe7946a0af1 Mon Sep 17 00:00:00 2001 From: Daniel Tesfai Date: Tue, 3 Sep 2019 17:04:43 -0400 Subject: [PATCH] project now on PyPi --- .gitignore | 2 ++ LICENSE.txt | 21 +++++++++++++++++++++ README.md | 2 +- setup.cfg | 2 ++ setup.py | 40 +++++----------------------------------- 5 files changed, 31 insertions(+), 36 deletions(-) create mode 100644 LICENSE.txt create mode 100644 setup.cfg diff --git a/.gitignore b/.gitignore index 7ca58a0..dde18d1 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,8 @@ lib lib64 share pyvenv.cfg +templates +*.egg-info # Unit test / coverage reports .coverage diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..5c54a15 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 DANIEL TESFAI + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index d43faa1..80a24b2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ python setup.py install ### Requirements -- Python 2.7+ or 3.4+ +- Python 3.4+ ## Usage diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..224a779 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md \ No newline at end of file diff --git a/setup.py b/setup.py index 5fe4d90..718511c 100644 --- a/setup.py +++ b/setup.py @@ -1,53 +1,23 @@ import os import sys from setuptools import setup, find_packages -from setuptools.command.test import test as TestCommand -class PyTest(TestCommand): - user_options = [("pytest-args=", "a", "Arguments to pass to pytest")] - - def initialize_options(self): - TestCommand.initialize_options(self) - self.pytest_args = "-n auto" - - def run_tests(self): - import shlex - import pytest - - errno = pytest.main(shlex.split(self.pytest_args)) - sys.exit(errno) - -here = os.path.abspath(os.path.dirname(__file__)) - -version_contents = {} -with open(os.path.join(here, "voipms", "version.py"), encoding="utf-8") as f: - exec(f.read(), version_contents) +with open("README.md", "r") as fh: + long_description = fh.read() setup( name="voipms-python", - version=version_contents["VERSION"], + version="0.0.1", description="Python wrapper for the voip.ms REST API", + long_description=long_description, + long_description_content_type="text/markdown", author="Daniel Tesfai", author_email="danielmtesfai@gmail.com", url="https://github.com/dtesfai/voipms-python", license="MIT", keywords="voipms api", packages=find_packages(exclude=["tests", "tests.*"]), - zip_safe=False, - install_requires=[ - 'requests >= 2.20; python_version >= "3.0"' - ], python_requires=">=3.4", - tests_require=[ - "pytest >= 4.6.2, < 4.7", - "pytest-mock >= 1.10.4", - "pytest-xdist >= 1.28.0", - "pytest-cov >= 2.7.1", - # coverage 5.0 pre-releases don't work, and setuptools doesn't ignore - # pre-releases (cf. https://github.com/pypa/setuptools/issues/855) - "coverage >= 4.5.3, < 5", - ], - cmdclass={"test": PyTest}, project_urls={ "Bug Tracker": "https://github.com/dtesfai/voipms-python/issues", "Source Code": "https://github.com/dtesfai/voipms-python",