Skip to content

Commit 23f82d9

Browse files
graingertilevkivskyi
authored andcommitted
use extras_require to add typing pkg (#3701)
* use extras_require to add typing pkg * pip to install packages
1 parent 65aedb5 commit 23f82d9

File tree

5 files changed

+10
-25
lines changed

5 files changed

+10
-25
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ python:
1414
# - "pypy3"
1515

1616
install:
17+
- pip install -U pip setuptools wheel
1718
- pip install -r test-requirements.txt
1819
- python2 -m pip install --user typing
19-
- python setup.py install
20+
- pip install .
2021

2122
script:
2223
- python runtests.py -j16 -x lint

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Or you can jump straight to the documentation:
129129
Troubleshooting
130130
---------------
131131

132-
Depending on your configuration, you may have to run `pip3` like
132+
Depending on your configuration, you may have to run `pip` like
133133
this:
134134

135135
$ python3 -m pip install -U mypy
@@ -140,8 +140,8 @@ can install it manually:
140140

141141
$ python3 -m pip install -U typed-ast
142142

143-
If the `mypy` command isn't found after installation: After either
144-
`pip3 install` or `setup.py install`, the `mypy` script and
143+
If the `mypy` command isn't found after installation: After
144+
`python3 -m pip install`, the `mypy` script and
145145
dependencies, including the `typing` module, will be installed to
146146
system-dependent locations. Sometimes the script directory will not
147147
be in `PATH`, and you have to add the target directory to `PATH`

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ install:
1414
- "%PYTHON%\\python.exe -m pip install -r test-requirements.txt"
1515
- "git submodule update --init typeshed"
1616
- "cd typeshed && git config core.symlinks true && git reset --hard && cd .."
17-
- "%PYTHON%\\python.exe setup.py -q install"
17+
- "%PYTHON%\\python.exe -m pip install ."
1818

1919
build: off
2020

setup.cfg

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,3 @@ parallel = true
4949

5050
[coverage:report]
5151
show_missing = true
52-
53-
[metadata]
54-
# This seems to be used only by bdist_wheel.
55-
# You need "pip3 install wheel".
56-
# Then run "python3 setup.py bdist_wheel" to build a wheel file
57-
# (and then upload that to PyPI).
58-
requires-dist =
59-
typed-ast >= 1.0.4, < 1.1.0
60-
typing >= 3.5.3; python_version < "3.5"

setup.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,6 @@ def run(self):
9494

9595
package_dir = {'mypy': 'mypy'}
9696

97-
98-
# These requirements are used when installing by other means than bdist_wheel.
99-
# E.g. "pip3 install ." or
100-
# "pip3 install git+git://github.com/python/mypy.git"
101-
# (as suggested by README.md).
102-
install_requires = []
103-
install_requires.append('typed-ast >= 1.0.4, < 1.1.0')
104-
if sys.version_info < (3, 5):
105-
install_requires.append('typing >= 3.5.3')
106-
10797
setup(name='mypy',
10898
version=version,
10999
description=description,
@@ -121,5 +111,8 @@ def run(self):
121111
data_files=data_files,
122112
classifiers=classifiers,
123113
cmdclass={'build_py': CustomPythonBuild},
124-
install_requires=install_requires,
114+
install_requires = ['typed-ast >= 1.0.4, < 1.1.0'],
115+
extras_require = {
116+
':python_version < "3.5"': 'typing >= 3.5.3',
117+
},
125118
)

0 commit comments

Comments
 (0)