From dd692320c9f1779497df9b8cbc30c4d9ebc2337d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Sat, 4 Nov 2017 22:01:18 +0100 Subject: [PATCH] Apply review comments define 3 kinds of requirements (base, dev, test) retrieve version from __init__.py define setuptools minimal version in CI install full (base, dev, test) dependencies --- MANIFEST.in | 1 - README.md | 2 +- octodns/__init__.py | 22 +--------------------- script/bootstrap | 2 +- setup.cfg | 35 ++++++++++++++++++----------------- 5 files changed, 21 insertions(+), 41 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 3a26904..cda90ed 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,6 +3,5 @@ include CONTRIBUTING.md include LICENSE include docs/* include octodns/* -include requirements*.txt include script/* include tests/* diff --git a/README.md b/README.md index ec9164f..ed1ac3b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ $ cd dns $ virtualenv env ... $ source env/bin/activate -$ pip install -U setuptools +$ pip install -U setuptools>⁼30.3.0 $ pip install octodns $ mkdir config ``` diff --git a/octodns/__init__.py b/octodns/__init__.py index aaaa2a5..05a5e84 100644 --- a/octodns/__init__.py +++ b/octodns/__init__.py @@ -1,25 +1,5 @@ from __future__ import absolute_import, division, print_function, \ unicode_literals -import pkg_resources -from os import path -from setuptools.config import read_configuration -def _extract_version(package_name): - try: - return pkg_resources.get_distribution(package_name).version - except pkg_resources.DistributionNotFound: - _conf = read_configuration( - path.join( - path.dirname(path.dirname(__file__)), - 'setup.cfg' - ) - ) - return _conf['metadata']['version'] - - -__version__ = _extract_version('octodns') - - -if __name__ == "__main__": - print(__version__) +__version__ = '0.8.8' diff --git a/script/bootstrap b/script/bootstrap index dfbb142..7f4a5a8 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -22,7 +22,7 @@ fi pip install -e . if [ "$ENV" != "production" ]; then - pip install -e .[dev] + pip install -e .[dev,test] fi if [ ! -L ".git/hooks/pre-commit" ]; then diff --git a/setup.cfg b/setup.cfg index f21fdbb..70baaf6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ name = octodns description = "DNS as code - Tools for managing DNS across multiple providers" long_description = file: README.md -version = 0.8.8 +version = attr: octodns.__version__ author = Ross McFarland author_email = rwmcfa1@gmail.com url = https://github.com/github/octodns @@ -20,27 +20,14 @@ classifiers = [options] install_requires = - PyYaml==3.12 - azure-mgmt-dns==1.0.1 - azure-common==1.1.6 - boto3==1.4.6 - botocore==1.6.8 - dnspython==1.15.0 - docutils==0.14 - dyn==1.8.0 + PyYaml>=3.12 + dnspython>=1.15.0 futures==3.1.1 - google-cloud==0.27.0 incf.countryutils==1.0 ipaddress==1.0.18 - jmespath==0.9.3 - msrestazure==0.4.10 natsort==5.0.3 - nsone==0.9.14 - ovh==0.4.7 python-dateutil==2.6.1 requests==2.13.0 - s3transfer==0.1.10 - six==1.10.0 packages = find: include_package_data = True @@ -57,7 +44,21 @@ exclude = tests [options.extras_require] -dev = +dev = + azure-mgmt-dns==1.0.1 + azure-common==1.1.6 + boto3==1.4.6 + botocore==1.6.8 + docutils==0.14 + dyn==1.8.0 + google-cloud==0.27.0 + jmespath==0.9.3 + msrestazure==0.4.10 + nsone==0.9.14 + ovh==0.4.7 + s3transfer==0.1.10 + six==1.10.0 +test = coverage mock nose