From f86c06d30429f7da0faab7cb0678087a3ddd31b7 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Fri, 20 Apr 2018 12:35:58 -0700 Subject: [PATCH] Revert the setup.cfg infra and go back to requirements.txt I've continually run into problems with the setup.cfg route that I'm not interested in investing the time to debug and fix. Looking around it doesn't seem to be very common yet so I've had a hard time finding help/docs etc. --- CONTRIBUTING.md | 5 ++-- requirements-dev.txt | 7 +++++ requirements.txt | 22 ++++++++++++++ script/bootstrap | 5 ++-- setup.cfg | 69 -------------------------------------------- setup.py | 47 ++++++++++++++++++++++++++++-- 6 files changed, 80 insertions(+), 75 deletions(-) create mode 100644 requirements-dev.txt create mode 100644 requirements.txt delete mode 100644 setup.cfg diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36337eb..9b9080a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,9 +38,10 @@ Here are a few things you can do that will increase the likelihood of your pull - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). -## Development prerequisites +## Development setup -- setuptools >= 30.3.0 +pip instal -r requirements.txt +pip instal -r requirements-dev.txt ## License note diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..5b942dd --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,7 @@ +coverage +mock +nose +pycodestyle==2.4.0 +pyflakes==1.6.0 +requests_mock +twine==1.11.0 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..28023d5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,22 @@ +PyYaml==3.12 +azure-common==1.1.9 +azure-mgmt-dns==1.0.1 +boto3==1.7.5 +botocore==1.10.5 +dnspython==1.15.0 +docutils==0.14 +dyn==1.8.1 +futures==3.2.0 +google-cloud==0.32.0 +incf.countryutils==1.0 +ipaddress==1.0.22 +jmespath==0.9.3 +msrestazure==0.4.27 +natsort==5.2.0 +nsone==0.9.100 +ovh==0.4.8 +python-dateutil==2.6.1 +requests==2.18.4 +s3transfer==0.1.13 +six==1.11.0 +setuptools==38.5.2 diff --git a/script/bootstrap b/script/bootstrap index 7f4a5a8..13e930d 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -19,10 +19,11 @@ if [ ! -d "$VENV_NAME" ]; then fi . "$VENV_NAME/bin/activate" -pip install -e . +pip install -U pip +pip install -r requirements.txt if [ "$ENV" != "production" ]; then - pip install -e .[dev,test] + pip install -r requirements-dev.txt fi if [ ! -L ".git/hooks/pre-commit" ]; then diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 15fed62..0000000 --- a/setup.cfg +++ /dev/null @@ -1,69 +0,0 @@ -[metadata] -name = octodns -description = "DNS as code - Tools for managing DNS across multiple providers" -long_description = file: README.md -version = attr: octodns.__VERSION__ -author = Ross McFarland -author_email = rwmcfa1@gmail.com -url = https://github.com/github/octodns -license = MIT -keywords = dns, providers -classifiers = - License :: OSI Approved :: MIT License - Programming Language :: Python - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.3 - Programming Language :: Python :: 3.4 - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - -[options] -install_requires = - PyYaml>=3.12 - dnspython>=1.15.0 - futures>=3.1.1 - incf.countryutils>=1.0 - ipaddress>=1.0.18 - natsort>=5.0.3 - python-dateutil>=2.6.1 - requests>=2.13.0 -packages = find: -include_package_data = True - -[options.entry_points] -console_scripts = - octodns-compare = octodns.cmds.compare:main - octodns-dump = octodns.cmds.dump:main - octodns-report = octodns.cmds.report:main - octodns-sync = octodns.cmds.sync:main - octodns-validate = octodns.cmds.validate:main - -[options.packages.find] -exclude = - tests - -[options.extras_require] -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.17 - ovh>=0.4.7 - s3transfer>=0.1.10 - six>=1.10.0 - twine>=1.11.0 -test = - coverage - mock - nose - pycodestyle - pyflakes - requests_mock - setuptools>=36.4.0 diff --git a/setup.py b/setup.py index 2598061..f56b68d 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,48 @@ #!/usr/bin/env python -from setuptools import setup +from os.path import dirname, join +import octodns -setup() +try: + from setuptools import find_packages, setup +except ImportError: + from distutils.core import find_packages, setup + +cmds = ( + 'compare', + 'dump', + 'report', + 'sync', + 'validate' +) +cmds_dir = join(dirname(__file__), 'octodns', 'cmds') +console_scripts = { + 'octodns-{name} = octodns.cmds.{name}:main'.format(name=name) + for name in cmds +} + +setup( + author='Ross McFarland', + author_email='rwmcfa1@gmail.com', + description=octodns.__doc__, + entry_points={ + 'console_scripts': console_scripts, + }, + install_requires=[ + 'PyYaml>=3.12', + 'dnspython>=1.15.0', + 'futures>=3.2.0', + 'incf.countryutils>=1.0', + 'ipaddress>=1.0.22', + 'natsort>=5.2.0', + # botocore doesn't like >=2.7.0 for some reason + 'python-dateutil>=2.6.0,<2.7.0', + 'requests>=2.18.4' + ], + license='MIT', + long_description=open('README.md').read(), + name='octodns', + packages=find_packages(), + url='https://github.com/github/octodns', + version=octodns.__VERSION__, +)