Skip to content

Commit

Permalink
fix #181, use python_requires (from pip 9)
Browse files Browse the repository at this point in the history
  • Loading branch information
schettino72 committed Aug 6, 2017
1 parent 8fa2538 commit 964b504
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 38 deletions.
11 changes: 1 addition & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,7 @@ init:
- "ECHO %PYTHON%"
- ps: "ls C:/Python*"
install:
#- ps: (new-object net.webclient).DownloadFile('https://raw.github.com/pypa/pip/master/contrib/get-pip.py', 'C:/get-pip.py')
#- "%PYTHON%/python.exe C:/get-pip.py"
#- "%PYTHON%/Scripts/pip.exe install --upgrade setuptools"

# Explicitly install pytest from NOT the wheel distribution to ensure it
# works with Python 2.7.
# See: https://github.com/pytest-dev/pytest/issues/749
# https://bitbucket.org/pytest-dev/pytest/issues/749/
- "%PYTHON%/python.exe -m pip install -U pip"
- "%PYTHON%/Scripts/pip.exe install -U setuptools pytest --no-binary all"
- "%PYTHON%/python.exe -m pip install -U pip setuptools"

- "%PYTHON%/Scripts/pip.exe install ."
- "%PYTHON%/Scripts/pip.exe install -r dev_requirements.txt"
Expand Down
4 changes: 2 additions & 2 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Installing
Latest version of `doit` supports only python 3.
If you are using python 2::

$ pip install doit==0.29.0
$ pip install "doit<0.30"

* `Download <http://pypi.python.org/pypi/doit>`_ the source and::

$ python setup.py install
$ pip install -e .

* Get latest development version::

Expand Down
44 changes: 18 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
#! /usr/bin/env python3

from __future__ import print_function
import sys

from setuptools import setup


install_requires = ['cloudpickle']


########### last version to support python2 is 0.29 ####
if sys.version_info[0] < 3:
sys.exit('This version of doit is only supported by Python 3.\n' +
'Please use doit==0.29.0 with Python 2.')
try:
import pip
pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]])
if pip_version < (9, 0, 1) :
pip_message = 'Your pip version is out of date, please install pip >= 9.0.1. '\
'pip {} detected.'.format(pip.__version__)
print(pip_message, file=sys.stderr)
sys.exit(1)
except Exception:
# what if someone does not have pip installed
pass

########################################################

########### platform specific stuff #############
import platform
platform_system = platform.system()

# auto command dependencies to watch file-system
if platform_system == "Darwin":
install_requires.append('macfsevents')
elif platform_system == "Linux":
install_requires.append('pyinotify')

##################################################



long_description = """
`doit` is a task management & automation tool
Expand Down Expand Up @@ -77,14 +71,12 @@
keywords = "build make task automation pipeline",

packages = ['doit'],
install_requires = install_requires,
# extra_requires with environment markers can be used only
# newer versions of setuptools that most users do not have
# installed. So wait for a while before use them (2017-02)
# extras_require={
# ':sys.platform == "darwin"': ['macfsevents'],
# ':sys.platform == "linux"': ['pyinotify'],
# },
python_requires='>=3.4',
install_requires = ['cloudpickle'],
extras_require={
':sys.platform == "darwin"': ['macfsevents'],
':sys.platform == "linux"': ['pyinotify'],
},
long_description = long_description,
entry_points = {
'console_scripts': [
Expand Down

0 comments on commit 964b504

Please sign in to comment.