From 4a299ec40b9ff4f656d405097aea3e2d08b11ba9 Mon Sep 17 00:00:00 2001 From: Matthew Planchard Date: Wed, 20 Jan 2016 14:18:22 -0600 Subject: [PATCH] Added python3.5 support to setup.py and tests for #108 - Added wheel to dev requirements --- .travis.yml | 3 ++- README.rst | 12 ++++++------ requirements/dev.pip | 4 ++-- setup.py | 13 +++++++------ tox.ini | 2 +- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69753c5..27eaa27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,11 @@ sudo: false language: python -python: 2.7 +python: 3.5 env: - TOX_ENV=py27 - TOX_ENV=py33 - TOX_ENV=py34 + - TOX_ENV=py35 - TOX_ENV=pypy script: diff --git a/README.rst b/README.rst index c1ae638..6384de6 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,7 @@ Quickstart: Installation and Usage *pypiserver* `> 1.2.x` works with python `2.7` and `3.3 --> 3.5` or *pypy*. Python `3.0 --> 3.2` may also work, but it is not being tested with these versions. -For older python-2 version, use version `1.1.x` series. +For older python-2 versions, use *pypiserver* `1.1.x` series. Run the following commands to get your PyPI server up and running:: @@ -120,7 +120,7 @@ Currently only password-protected uploads are supported! breaks the procedure in two steps. Furthermore, it allows you to pre-sign your files with PGP-Signatures - and upload also the generated `.asc` files to *pypiserver*:: + and upload also the generated `.asc` files to *pypiserver*:: twine upload -r local --sign -identity user_name ./foo-1.zip @@ -391,11 +391,11 @@ install the ``watchdog`` package, or it can be installed by installing pip install pypi-server[cache] -If you are using a static webserver such as *Apache* or *nginx* as -a reverse-proxy for pypiserver, additional speedup can be gained by +If you are using a static webserver such as *Apache* or *nginx* as +a reverse-proxy for pypiserver, additional speedup can be gained by directly serving the packages directory: -For instance, in *nginx* you may adding the following config to serve +For instance, in *nginx* you may adding the following config to serve packages-directly directly (take care not to expose "sensitive" files):: location /packages/ { @@ -522,7 +522,7 @@ implements just enough to make ``easy_install`` and ``pip install`` to work. The following limitations are known: - It doesn't implement the XMLRPC json API interface: pip search - will not work (a patch has been suggested: + will not work (a patch has been suggested: issue https://github.com/pypiserver/pypiserver/issues/80). - Command ``pypi -U`` that compares uploaded packages with *pypi* to see if they are outdated does not respect a http-proxy environment variable diff --git a/requirements/dev.pip b/requirements/dev.pip index 1a9a87f..be26164 100644 --- a/requirements/dev.pip +++ b/requirements/dev.pip @@ -10,7 +10,7 @@ setuptools setuptools-git>=0.3 passlib tox -wheel +wheel>=0.25.0 pytest>=2.3 webtest; python_version != '2.5' mock; python_version <= '3.2' @@ -19,4 +19,4 @@ twine>=1.6.1 WebOb==0.9.6.1; python_version == '2.5' BeautifulSoup==3.2.1; python_version == '2.5' -WebTest==1.4.3; python_version == '2.5' \ No newline at end of file +WebTest==1.4.3; python_version == '2.5' diff --git a/setup.py b/setup.py index 5582feb..2b84387 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,12 @@ tests_require = ['pytest>=2.3', 'tox', 'twine', 'pip>=7', 'passlib', 'webtest'] if sys.version_info <= (3, 2): tests_require.append('mock') +setup_requires = ['setuptools', 'setuptools-git >= 0.3'] +if sys.version_info >= (3,5): + setup_requires.append('wheel >= 0.25.0') # earlier wheels fail in 3.5 +else: + setup_requires.append('wheel') + def get_version(): d = {} @@ -29,12 +35,7 @@ setup(name="pypiserver", version=get_version(), packages=["pypiserver"], package_data={'pypiserver': ['welcome.html']}, - setup_requires=[ - 'setuptools', - # Gather package-data from all files in git. - 'setuptools-git >= 0.3', - 'wheel', - ], + setup_requires=setup_requires, extras_require={ 'passlib': ['passlib'], 'cache': ['watchdog'] diff --git a/tox.ini b/tox.ini index 3a99d7a..df54729 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py33,py34 +envlist = py27,py33,py34,py35 [testenv] deps=-r{toxinidir}/requirements/dev.pip