From 1c643d483e4dbb3ce188b3e66036a43d2783dd48 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Sat, 22 Nov 2014 14:19:19 +0100 Subject: [PATCH] Basic dev/testing setup --- README.md | 9 +++++++-- setup.cfg | 5 +++++ setup.py | 28 ++++++++++++++++++++-------- 3 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 setup.cfg diff --git a/README.md b/README.md index dd750d0f4..d7264d7e3 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,14 @@ sudo ./venv/bin/letsencrypt Note, that letsencrypt does not yet handle Debian unstable's Apache2 conf layout. -## Developing +## Hacking -`python setup.py develop --user` +#. Bootstrap: `./venv/bin/python setup.py dev` + +#. Test code base: `./venv/bin/nosetests` + +#. Check coding style for the whole project `./venv/bin/pylint letsencrypt`, + or specific module, e.g. `./venv/bin/pylint letsencrypt.client.acme`. ## Command line usage diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..2968e59c2 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[easy_install] +zip_ok = false + +[aliases] +dev = develop easy_install letsencrypt[testing] \ No newline at end of file diff --git a/setup.py b/setup.py index b39a8230d..2d5bff09c 100755 --- a/setup.py +++ b/setup.py @@ -2,6 +2,21 @@ from setuptools import setup +install_requires = [ + 'jsonschema', + 'M2Crypto', + 'pycrypto', + 'python-augeas', + 'python2-pythondialog', + 'requests', +] + +testing_extras = [ + 'coverage', + 'nose', + 'pylint', +] + setup( name="letsencrypt", version="0.1", @@ -14,18 +29,15 @@ setup( 'letsencrypt.client', 'letsencrypt.scripts', ], - install_requires=[ - 'jsonschema', - 'M2Crypto', - 'pycrypto', - 'python-augeas', - 'python2-pythondialog', - 'requests', - ], dependency_links=[ # http://augeas.net/download.html 'https://fedorahosted.org/released/python-augeas/', ], + install_requires=install_requires, + tests_require=install_requires, + extras_require={ + 'testing': testing_extras, + }, entry_points={ 'console_scripts': [ 'letsencrypt = letsencrypt.scripts.main:main',