Repository navigation
[WIP] Make typing and typed-ast external dependencies - #2340
gvanrossum wants to merge 2 commits into
Conversation
This will automatically install the typing and typed-ast packages when appropriate. The setup.py file now depends on setuptools. We should build wheels so that users installing from PyPI won't need setuptools. In order to build wheels the distribution builder/uploader needs to install the wheel package. To manage those dependencies, I've added build-requirements.txt. In summary: - python3 -m pip install -r build-requirements.txt - python3 setup.py bdist_wheel - upload the .whl file that appears in the dist/ subdirectory to PyPI
…cific typing package
| if os.name == 'nt': | ||
| scripts.append('scripts/mypy.bat') | ||
|
|
||
| install_requires = [] |
There was a problem hiding this comment.
Actually I think dynamic construction of this variable is wrong. I tried to use the environment markers syntax for these but that didn't seem to work correctly either. I'll have to improve this through trial and error.
| hello, world | ||
|
|
||
| [case testAbstractBaseClasses] | ||
| -- Skipped because different typing package versions have different repr()s. |
There was a problem hiding this comment.
That's a side effect of installing the typing package from PyPI. Previously we always used the one from lib-typing/3.2, which is more recent than typing 3.5.2 from pypi. Somehow the test passed in Travis-CI on Python 3.5, which makes me wonder whether Travis is using a 3.5.3 prerelease or whether I've missed the 3.5.3 release?
| license='MIT License', | ||
| platforms=['POSIX'], | ||
| package_dir=package_dir, | ||
| py_modules=['typing'] if sys.version_info < (3, 5, 0) else [], |
There was a problem hiding this comment.
I wish I could remove lib-typing completely, but it's used by some tests still.
| @@ -1,3 +1,2 @@ | |||
| recursive-include lib-typing *.py | |||
There was a problem hiding this comment.
This omits it from the package we upload to PyPI. It's still in the repo.
| @@ -0,0 +1,2 @@ | |||
| setuptools | |||
|
I'm withdrawing this. Either I don't understand wheels or pip, or this is not (yet) possible. |
|
Reopening. I've figured out some extra magic to be put in setup.cfg. The typing dependency is now correctly version-dependent. However the installed scripts (mypy, stubgen) have the Python version used to create the wheel file hard-coded, so I'll have to do some more digging. There's also the problem that I'm getting warnings about the version being invalid. (Actually it's a new PR: #2452) |
This will automatically install the typing and typed-ast packages when
appropriate.
The setup.py file now depends on setuptools. We should build wheels
so that users installing from PyPI won't need setuptools. In order to
build wheels the distribution builder/uploader needs to install the
wheel package. To manage those dependencies, I've added
build-requirements.txt.
In summary: