From 46f00f4bc3b8e14c569233d295f8377a3aeae1a5 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 14 Jan 2019 10:31:07 +0900 Subject: [PATCH] Imported Upstream version 34.4.0 --- .gitignore | 16 +++ .travis.yml | 44 +++++++ CHANGES.rst | 10 ++ PKG-INFO | 51 -------- appveyor.yml | 20 ++++ docs/conf.py | 70 +++++------ docs/requirements.txt | 7 +- docs/setuptools.txt | 2 + pyproject.toml | 9 ++ setup.cfg | 6 +- setup.py | 5 +- setuptools.egg-info/PKG-INFO | 51 -------- setuptools.egg-info/SOURCES.txt | 143 ----------------------- setuptools.egg-info/dependency_links.txt | 2 - setuptools.egg-info/entry_points.txt | 64 ---------- setuptools.egg-info/requires.txt | 9 -- setuptools.egg-info/top_level.txt | 3 - setuptools.egg-info/zip-safe | 1 - setuptools/config.py | 1 + setuptools/dist.py | 4 +- setuptools/msvc.py | 111 +++++++++++++++--- setuptools/tests/test_config.py | 4 + tests/requirements.txt | 3 + 23 files changed, 241 insertions(+), 395 deletions(-) create mode 100644 .gitignore create mode 100644 .travis.yml delete mode 100644 PKG-INFO create mode 100644 appveyor.yml create mode 100644 pyproject.toml delete mode 100644 setuptools.egg-info/PKG-INFO delete mode 100644 setuptools.egg-info/SOURCES.txt delete mode 100644 setuptools.egg-info/dependency_links.txt delete mode 100644 setuptools.egg-info/entry_points.txt delete mode 100644 setuptools.egg-info/requires.txt delete mode 100644 setuptools.egg-info/top_level.txt delete mode 100644 setuptools.egg-info/zip-safe create mode 100644 tests/requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ec3d0e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +# syntax: glob +bin +build +dist +include +lib +distribute.egg-info +setuptools.egg-info +.coverage +.tox +*.egg +*.py[cod] +*.swp +*~ +.hg* +requirements.txt diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..adb2f94 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,44 @@ +language: python +python: + - 2.6 + - 2.7 + - 3.3 + - 3.4 + - 3.5 + - 3.6 + - nightly + - pypy +matrix: + include: + - python: 3.6 + env: LC_ALL=C LC_CTYPE=C + - python: 2.7 + env: LC_ALL=C LC_CTYPE=C +script: + # need tox and rwt to get started + - pip install tox rwt + + # Output the env, to verify behavior + - env + + # update egg_info based on setup.py in checkout + - python bootstrap.py + + - tox + +before_deploy: + - pip install -r requirements.txt +deploy: + provider: pypi + # Also update server in setup.cfg + server: https://upload.pypi.org/legacy/ + on: + tags: true + all_branches: true + python: 3.6 + condition: $LC_ALL != "C" + user: jaraco + password: + secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= + distributions: release + skip_upload_docs: true diff --git a/CHANGES.rst b/CHANGES.rst index 54eba03..081e2cf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v34.4.0 +------- + +* #995: In MSVC support, add support for Microsoft + Build Tools 2017. + +* #999 via #1007: Extend support for declarative package + config in a setup.cfg file to include the options + ``python_requires`` and ``py_modules``. + v34.3.3 ------- diff --git a/PKG-INFO b/PKG-INFO deleted file mode 100644 index 439d58b..0000000 --- a/PKG-INFO +++ /dev/null @@ -1,51 +0,0 @@ -Metadata-Version: 1.2 -Name: setuptools -Version: 34.3.3 -Summary: Easily download, build, install, upgrade, and uninstall Python packages -Home-page: https://github.com/pypa/setuptools -Author: Python Packaging Authority -Author-email: distutils-sig@python.org -License: UNKNOWN -Description: .. image:: https://readthedocs.org/projects/setuptools/badge/?version=latest - :target: https://setuptools.readthedocs.io - - See the `Installation Instructions - `_ in the Python Packaging - User's Guide for instructions on installing, upgrading, and uninstalling - Setuptools. - - The project is `maintained at GitHub `_. - - Questions and comments should be directed to the `distutils-sig - mailing list `_. - Bug reports and especially tested patches may be - submitted directly to the `bug tracker - `_. - - - Code of Conduct - --------------- - - Everyone interacting in the setuptools project's codebases, issue trackers, - chat rooms, and mailing lists is expected to follow the - `PyPA Code of Conduct `_. - -Keywords: CPAN PyPI distutils eggs package management -Platform: UNKNOWN -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: MIT License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Classifier: Topic :: System :: Archiving :: Packaging -Classifier: Topic :: System :: Systems Administration -Classifier: Topic :: Utilities -Requires-Python: >=2.6,!=3.0.*,!=3.1.*,!=3.2.* diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..9313a48 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,20 @@ +environment: + + APPVEYOR: true + + matrix: + - PYTHON: "C:\\Python35-x64" + - PYTHON: "C:\\Python27-x64" + +install: + # symlink python from a directory with a space + - "mklink /d \"C:\\Program Files\\Python\" %PYTHON%" + - "SET PYTHON=\"C:\\Program Files\\Python\"" + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + +build: off + +test_script: + - "python bootstrap.py" + - "python -m pip install tox" + - "tox" diff --git a/docs/conf.py b/docs/conf.py index fe68427..f7d0230 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,18 +18,23 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -# Allow Sphinx to find the setup command that is imported below, as referenced above. -import os +import subprocess import sys -sys.path.append(os.path.abspath('..')) +import os + -import setup as setup_script +# hack to run the bootstrap script so that jaraco.packaging.sphinx +# can invoke setup.py +'READTHEDOCS' in os.environ and subprocess.check_call( + [sys.executable, 'bootstrap.py'], + cwd=os.path.join(os.path.dirname(__file__), os.path.pardir), +) # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['rst.linker', 'sphinx.ext.autosectionlabel'] +extensions = ['jaraco.packaging.sphinx', 'rst.linker', 'sphinx.ext.autosectionlabel'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -40,19 +45,6 @@ source_suffix = '.txt' # The master toctree document. master_doc = 'index' -# General information about the project. -project = 'Setuptools' -copyright = '2009-2014, The fellowship of the packaging' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = setup_script.setup_params['version'] -# The full version, including alpha/beta/rc tags. -release = setup_script.setup_params['version'] - # List of directories, relative to source directory, that shouldn't be searched # for source files. exclude_trees = [] @@ -69,13 +61,6 @@ html_theme = 'nature' # Add any paths that contain custom themes here, relative to this directory. html_theme_path = ['_theme'] -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -html_title = "Setuptools documentation" - -# A shorter title for the navigation bar. Default is the same as html_title. -html_short_title = "Setuptools" - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. html_use_smartypants = True @@ -89,9 +74,6 @@ html_use_modindex = False # If false, no index is generated. html_use_index = False -# Output file base name for HTML help builder. -htmlhelp_basename = 'Setuptoolsdoc' - # -- Options for LaTeX output -------------------------------------------------- # Grouping the document tree into LaTeX files. List of tuples @@ -109,60 +91,60 @@ link_files = { ), replace=[ dict( - pattern=r"(Issue )?#(?P\d+)", - url='{GH}/pypa/setuptools/issues/{issue}', + pattern=r'(Issue )?#(?P\d+)', + url='{package_url}/issues/{issue}', ), dict( - pattern=r"BB Pull Request ?#(?P\d+)", + pattern=r'BB Pull Request ?#(?P\d+)', url='{BB}/pypa/setuptools/pull-request/{bb_pull_request}', ), dict( - pattern=r"Distribute #(?P\d+)", + pattern=r'Distribute #(?P\d+)', url='{BB}/tarek/distribute/issue/{distribute}', ), dict( - pattern=r"Buildout #(?P\d+)", + pattern=r'Buildout #(?P\d+)', url='{GH}/buildout/buildout/issues/{buildout}', ), dict( - pattern=r"Old Setuptools #(?P\d+)", + pattern=r'Old Setuptools #(?P\d+)', url='http://bugs.python.org/setuptools/issue{old_setuptools}', ), dict( - pattern=r"Jython #(?P\d+)", + pattern=r'Jython #(?P\d+)', url='http://bugs.jython.org/issue{jython}', ), dict( - pattern=r"Python #(?P\d+)", + pattern=r'Python #(?P\d+)', url='http://bugs.python.org/issue{python}', ), dict( - pattern=r"Interop #(?P\d+)", + pattern=r'Interop #(?P\d+)', url='{GH}/pypa/interoperability-peps/issues/{interop}', ), dict( - pattern=r"Pip #(?P\d+)", + pattern=r'Pip #(?P\d+)', url='{GH}/pypa/pip/issues/{pip}', ), dict( - pattern=r"Packaging #(?P\d+)", + pattern=r'Packaging #(?P\d+)', url='{GH}/pypa/packaging/issues/{packaging}', ), dict( - pattern=r"[Pp]ackaging (?P\d+(\.\d+)+)", + pattern=r'[Pp]ackaging (?P\d+(\.\d+)+)', url='{GH}/pypa/packaging/blob/{packaging_ver}/CHANGELOG.rst', ), dict( - pattern=r"PEP[- ](?P\d+)", + pattern=r'PEP[- ](?P\d+)', url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', ), dict( - pattern=r"setuptools_svn #(?P\d+)", + pattern=r'setuptools_svn #(?P\d+)', url='{GH}/jaraco/setuptools_svn/issues/{setuptools_svn}', ), dict( - pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", - with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", + pattern=r'^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n', + with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', ), ], ), diff --git a/docs/requirements.txt b/docs/requirements.txt index 4be4188..2138c88 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,5 @@ -rst.linker>=1.6.1 -sphinx>=1.4 +sphinx +rst.linker>=1.9 +jaraco.packaging>=3.2 + +setuptools>=34 diff --git a/docs/setuptools.txt b/docs/setuptools.txt index f0da6e1..bf5bb8c 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2425,6 +2425,7 @@ zip_safe bool setup_requires list-semi install_requires list-semi extras_require section +python_requires str entry_points file:, section use_2to3 bool use_2to3_fixers list-comma @@ -2440,6 +2441,7 @@ package_dir dict package_data section exclude_package_data section namespace_packages list-comma +py_modules list-comma ======================= ===== .. note:: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0aa2e1c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,9 @@ +[build-system] +# for Setuptools, its own requirements are build requirements, +# so keep this in sync with install_requires in setup.py. +requires = [ + "wheel", + "packaging>=16.8", + "six>=1.10.0", + "appdirs>=1.4.0", +] diff --git a/setup.cfg b/setup.cfg index b8bba8a..fcade15 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 34.3.3 +current_version = 34.4.0 commit = True tag = True [egg_info] -tag_build = -tag_date = 0 +tag_build = .post +tag_date = 1 [aliases] clean_egg_info = egg_info -Db '' diff --git a/setup.py b/setup.py index 100acfa..0ccc663 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,8 @@ here = os.path.dirname(__file__) def require_metadata(): "Prevent improper installs without necessary metadata. See #659" - if not os.path.exists('setuptools.egg-info'): + egg_info_dir = os.path.join(here, 'setuptools.egg-info') + if not os.path.exists(egg_info_dir): msg = ( "Cannot build setuptools without metadata. " "Install rwt and run `rwt -- bootstrap.py`." @@ -88,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.3.3", + version="34.4.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", diff --git a/setuptools.egg-info/PKG-INFO b/setuptools.egg-info/PKG-INFO deleted file mode 100644 index 439d58b..0000000 --- a/setuptools.egg-info/PKG-INFO +++ /dev/null @@ -1,51 +0,0 @@ -Metadata-Version: 1.2 -Name: setuptools -Version: 34.3.3 -Summary: Easily download, build, install, upgrade, and uninstall Python packages -Home-page: https://github.com/pypa/setuptools -Author: Python Packaging Authority -Author-email: distutils-sig@python.org -License: UNKNOWN -Description: .. image:: https://readthedocs.org/projects/setuptools/badge/?version=latest - :target: https://setuptools.readthedocs.io - - See the `Installation Instructions - `_ in the Python Packaging - User's Guide for instructions on installing, upgrading, and uninstalling - Setuptools. - - The project is `maintained at GitHub `_. - - Questions and comments should be directed to the `distutils-sig - mailing list `_. - Bug reports and especially tested patches may be - submitted directly to the `bug tracker - `_. - - - Code of Conduct - --------------- - - Everyone interacting in the setuptools project's codebases, issue trackers, - chat rooms, and mailing lists is expected to follow the - `PyPA Code of Conduct `_. - -Keywords: CPAN PyPI distutils eggs package management -Platform: UNKNOWN -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: MIT License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Classifier: Topic :: System :: Archiving :: Packaging -Classifier: Topic :: System :: Systems Administration -Classifier: Topic :: Utilities -Requires-Python: >=2.6,!=3.0.*,!=3.1.*,!=3.2.* diff --git a/setuptools.egg-info/SOURCES.txt b/setuptools.egg-info/SOURCES.txt deleted file mode 100644 index 069d01a..0000000 --- a/setuptools.egg-info/SOURCES.txt +++ /dev/null @@ -1,143 +0,0 @@ -CHANGES.rst -LICENSE -MANIFEST.in -README.rst -bootstrap.py -conftest.py -easy_install.py -launcher.c -msvc-build-launcher.cmd -pytest.ini -setup.cfg -setup.py -tox.ini -docs/Makefile -docs/conf.py -docs/developer-guide.txt -docs/development.txt -docs/easy_install.txt -docs/formats.txt -docs/history.txt -docs/index.txt -docs/pkg_resources.txt -docs/python3.txt -docs/releases.txt -docs/requirements.txt -docs/roadmap.txt -docs/setuptools.txt -docs/_templates/indexsidebar.html -docs/_theme/nature/theme.conf -docs/_theme/nature/static/nature.css_t -docs/_theme/nature/static/pygments.css -pkg_resources/__init__.py -pkg_resources/api_tests.txt -pkg_resources/tests/__init__.py -pkg_resources/tests/test_markers.py -pkg_resources/tests/test_pkg_resources.py -pkg_resources/tests/test_resources.py -setuptools/__init__.py -setuptools/archive_util.py -setuptools/cli-32.exe -setuptools/cli-64.exe -setuptools/cli.exe -setuptools/config.py -setuptools/dep_util.py -setuptools/depends.py -setuptools/dist.py -setuptools/extension.py -setuptools/glob.py -setuptools/gui-32.exe -setuptools/gui-64.exe -setuptools/gui.exe -setuptools/launch.py -setuptools/lib2to3_ex.py -setuptools/monkey.py -setuptools/msvc.py -setuptools/namespaces.py -setuptools/package_index.py -setuptools/py26compat.py -setuptools/py27compat.py -setuptools/py31compat.py -setuptools/py33compat.py -setuptools/py36compat.py -setuptools/sandbox.py -setuptools/script (dev).tmpl -setuptools/script.tmpl -setuptools/site-patch.py -setuptools/ssl_support.py -setuptools/unicode_utils.py -setuptools/version.py -setuptools/windows_support.py -setuptools.egg-info/PKG-INFO -setuptools.egg-info/SOURCES.txt -setuptools.egg-info/dependency_links.txt -setuptools.egg-info/entry_points.txt -setuptools.egg-info/requires.txt -setuptools.egg-info/top_level.txt -setuptools.egg-info/zip-safe -setuptools/command/__init__.py -setuptools/command/alias.py -setuptools/command/bdist_egg.py -setuptools/command/bdist_rpm.py -setuptools/command/bdist_wininst.py -setuptools/command/build_clib.py -setuptools/command/build_ext.py -setuptools/command/build_py.py -setuptools/command/develop.py -setuptools/command/easy_install.py -setuptools/command/egg_info.py -setuptools/command/install.py -setuptools/command/install_egg_info.py -setuptools/command/install_lib.py -setuptools/command/install_scripts.py -setuptools/command/launcher manifest.xml -setuptools/command/py36compat.py -setuptools/command/register.py -setuptools/command/rotate.py -setuptools/command/saveopts.py -setuptools/command/sdist.py -setuptools/command/setopt.py -setuptools/command/test.py -setuptools/command/upload.py -setuptools/command/upload_docs.py -setuptools/tests/__init__.py -setuptools/tests/contexts.py -setuptools/tests/environment.py -setuptools/tests/files.py -setuptools/tests/fixtures.py -setuptools/tests/mod_with_constant.py -setuptools/tests/namespaces.py -setuptools/tests/py26compat.py -setuptools/tests/script-with-bom.py -setuptools/tests/server.py -setuptools/tests/test_archive_util.py -setuptools/tests/test_bdist_egg.py -setuptools/tests/test_build_clib.py -setuptools/tests/test_build_ext.py -setuptools/tests/test_build_py.py -setuptools/tests/test_config.py -setuptools/tests/test_dep_util.py -setuptools/tests/test_depends.py -setuptools/tests/test_develop.py -setuptools/tests/test_dist_info.py -setuptools/tests/test_easy_install.py -setuptools/tests/test_egg_info.py -setuptools/tests/test_find_packages.py -setuptools/tests/test_install_scripts.py -setuptools/tests/test_integration.py -setuptools/tests/test_manifest.py -setuptools/tests/test_msvc.py -setuptools/tests/test_namespaces.py -setuptools/tests/test_packageindex.py -setuptools/tests/test_sandbox.py -setuptools/tests/test_sdist.py -setuptools/tests/test_setuptools.py -setuptools/tests/test_test.py -setuptools/tests/test_unicode_utils.py -setuptools/tests/test_upload_docs.py -setuptools/tests/test_windows_wrappers.py -setuptools/tests/textwrap.py -setuptools/tests/indexes/test_links_priority/external.html -setuptools/tests/indexes/test_links_priority/simple/foobar/index.html -tests/manual_test.py -tests/test_pypi.py \ No newline at end of file diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt deleted file mode 100644 index e87d021..0000000 --- a/setuptools.egg-info/dependency_links.txt +++ /dev/null @@ -1,2 +0,0 @@ -https://files.pythonhosted.org/packages/source/c/certifi/certifi-2016.9.26.tar.gz#md5=baa81e951a29958563689d868ef1064d -https://files.pythonhosted.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2 diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt deleted file mode 100644 index 3f29bd3..0000000 --- a/setuptools.egg-info/entry_points.txt +++ /dev/null @@ -1,64 +0,0 @@ -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.6 = setuptools.command.easy_install:main - -[distutils.commands] -alias = setuptools.command.alias:alias -bdist_egg = setuptools.command.bdist_egg:bdist_egg -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -build_clib = setuptools.command.build_clib:build_clib -build_ext = setuptools.command.build_ext:build_ext -build_py = setuptools.command.build_py:build_py -develop = setuptools.command.develop:develop -easy_install = setuptools.command.easy_install:easy_install -egg_info = setuptools.command.egg_info:egg_info -install = setuptools.command.install:install -install_egg_info = setuptools.command.install_egg_info:install_egg_info -install_lib = setuptools.command.install_lib:install_lib -install_scripts = setuptools.command.install_scripts:install_scripts -register = setuptools.command.register:register -rotate = setuptools.command.rotate:rotate -saveopts = setuptools.command.saveopts:saveopts -sdist = setuptools.command.sdist:sdist -setopt = setuptools.command.setopt:setopt -test = setuptools.command.test:test -upload = setuptools.command.upload:upload -upload_docs = setuptools.command.upload_docs:upload_docs - -[distutils.setup_keywords] -convert_2to3_doctests = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -eager_resources = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -exclude_package_data = setuptools.dist:check_package_data -extras_require = setuptools.dist:check_extras -include_package_data = setuptools.dist:assert_bool -install_requires = setuptools.dist:check_requirements -namespace_packages = setuptools.dist:check_nsp -package_data = setuptools.dist:check_package_data -packages = setuptools.dist:check_packages -python_requires = setuptools.dist:check_specifier -setup_requires = setuptools.dist:check_requirements -test_loader = setuptools.dist:check_importable -test_runner = setuptools.dist:check_importable -test_suite = setuptools.dist:check_test_suite -tests_require = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool - -[egg_info.writers] -PKG-INFO = setuptools.command.egg_info:write_pkg_info -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -top_level.txt = setuptools.command.egg_info:write_toplevel_names - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt deleted file mode 100644 index b5b5680..0000000 --- a/setuptools.egg-info/requires.txt +++ /dev/null @@ -1,9 +0,0 @@ -packaging>=16.8 -six>=1.6.0 -appdirs>=1.4.0 - -[certs] -certifi==2016.9.26 - -[ssl:sys_platform=='win32'] -wincertstore==0.2 diff --git a/setuptools.egg-info/top_level.txt b/setuptools.egg-info/top_level.txt deleted file mode 100644 index 4577c6a..0000000 --- a/setuptools.egg-info/top_level.txt +++ /dev/null @@ -1,3 +0,0 @@ -easy_install -pkg_resources -setuptools diff --git a/setuptools.egg-info/zip-safe b/setuptools.egg-info/zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/setuptools.egg-info/zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/setuptools/config.py b/setuptools/config.py index 39a01f8..252f2de 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -462,6 +462,7 @@ class ConfigOptionsHandler(ConfigHandler): 'tests_require': parse_list_semicolon, 'packages': self._parse_packages, 'entry_points': self._parse_file, + 'py_modules': parse_list, } def _parse_packages(self, value): diff --git a/setuptools/dist.py b/setuptools/dist.py index 71c6c28..fd1d28c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -166,7 +166,7 @@ def check_specifier(dist, attr, value): packaging.specifiers.SpecifierSet(value) except packaging.specifiers.InvalidSpecifier as error: tmpl = ( - "{attr!r} must be a string or list of strings " + "{attr!r} must be a string " "containing valid version specifiers; {error}" ) raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) @@ -353,6 +353,8 @@ class Distribution(Distribution_parse_config_files, _Distribution): _Distribution.parse_config_files(self, filenames=filenames) parse_configuration(self, self.command_options) + if getattr(self, 'python_requires', None): + self.metadata.python_requires = self.python_requires def parse_command_line(self): """Process features after parsing command line options""" diff --git a/setuptools/msvc.py b/setuptools/msvc.py index d41daec..35c0212 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -13,6 +13,7 @@ Microsoft Visual C++ 10.0: Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) + Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) """ import os @@ -150,6 +151,7 @@ def msvc14_get_vc_env(plat_spec): ------------------------- Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) + Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) Parameters ---------- @@ -411,7 +413,7 @@ class RegistryInfo: ------ str: value """ - node64 = '' if self.pi.current_is_x86() or x86 else r'\Wow6432Node' + node64 = '' if self.pi.current_is_x86() or x86 else 'Wow6432Node' return os.path.join('Software', node64, 'Microsoft', key) def lookup(self, key, name): @@ -483,12 +485,13 @@ class SystemInfo: """ Find all available Microsoft Visual C++ versions. """ - vckeys = (self.ri.vc, self.ri.vc_for_python) + ms = self.ri.microsoft + vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs) vc_vers = [] for hkey in self.ri.HKEYS: for key in vckeys: try: - bkey = winreg.OpenKey(hkey, key, 0, winreg.KEY_READ) + bkey = winreg.OpenKey(hkey, ms(key), 0, winreg.KEY_READ) except (OSError, IOError): continue subkeys, values, _ = winreg.QueryInfoKey(bkey) @@ -525,9 +528,9 @@ class SystemInfo: """ Microsoft Visual C++ directory. """ - # Default path - default = r'Microsoft Visual Studio %0.1f\VC' % self.vc_ver - guess_vc = os.path.join(self.ProgramFilesx86, default) + self.VSInstallDir + + guess_vc = self._guess_vc() or self._guess_vc_legacy() # Try to get "VC++ for Python" path from registry as default path reg_path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) @@ -543,6 +546,30 @@ class SystemInfo: return path + def _guess_vc(self): + """ + Locate Visual C for 2017 + """ + + if self.vc_ver <= 14.0: + return + + default = r'VC\Tools\MSVC' + guess_vc = os.path.join(self.VSInstallDir, default) + # Subdir with VC exact version as name + try: + vc_exact_ver = os.listdir(guess_vc)[-1] + return os.path.join(guess_vc, vc_exact_ver) + except (OSError, IOError, IndexError): + pass + + def _guess_vc_legacy(self): + """ + Locate Visual C for versions prior to 2017 + """ + default = r'Microsoft Visual Studio %0.1f\VC' % self.vc_ver + return os.path.join(self.ProgramFilesx86, default) + @property def WindowsSdkVersion(self): """ @@ -725,8 +752,10 @@ class SystemInfo: bits: int Platform number of bits: 32 or 64. """ - # Find actual .NET version - ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) or '' + # Find actual .NET version in registry + reg_ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) + dot_net_dir = getattr(self, 'FrameworkDir%d' % bits) + ver = reg_ver or self._find_dot_net_in(dot_net_dir) or '' # Set .NET versions for specified MSVC++ version if self.vc_ver >= 12.0: @@ -740,6 +769,18 @@ class SystemInfo: frameworkver = ('v3.0', 'v2.0.50727') return frameworkver + def _find_dot_net_in(self, dot_net_dir): + """ + Find .Net in the Framework folder + """ + matching_dirs = ( + dir_name + for dir_name in reversed(os.listdir(dot_net_dir)) + if os.path.isdir(os.path.join(dot_net_dir, dir_name)) + and dir_name.startswith('v') + ) + return next(matching_dirs, None) + class EnvironmentInfo: """ @@ -810,7 +851,10 @@ class EnvironmentInfo: """ Microsoft Visual C++ & Microsoft Foundation Class Libraries """ - arch_subdir = self.pi.target_dir(hidex86=True) + if self.vc_ver >= 15.0: + arch_subdir = self.pi.target_dir(x64=True) + else: + arch_subdir = self.pi.target_dir(hidex86=True) paths = ['Lib%s' % arch_subdir, r'ATLMFC\Lib%s' % arch_subdir] if self.vc_ver >= 14.0: @@ -840,10 +884,20 @@ class EnvironmentInfo: if arch_subdir: tools += [os.path.join(si.VCInstallDir, 'Bin%s' % arch_subdir)] - if self.vc_ver >= 14.0: + if self.vc_ver == 14.0: path = 'Bin%s' % self.pi.current_dir(hidex86=True) tools += [os.path.join(si.VCInstallDir, path)] + elif self.vc_ver >= 15.0: + host_dir = (r'bin\HostX86%s' if self.pi.current_is_x86() else + r'bin\HostX64%s') + tools += [os.path.join( + si.VCInstallDir, host_dir % self.pi.target_dir(x64=True))] + + if self.pi.current_cpu != self.pi.target_cpu: + tools += [os.path.join( + si.VCInstallDir, host_dir % self.pi.current_dir(x64=True))] + else: tools += [os.path.join(si.VCInstallDir, 'Bin')] @@ -933,13 +987,17 @@ class EnvironmentInfo: """ Microsoft Windows SDK Tools """ - bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' - tools = [os.path.join(self.si.WindowsSdkDir, bin_dir)] + return list(self._sdk_tools()) + + def _sdk_tools(self): + if self.vc_ver < 15.0: + bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' + yield os.path.join(self.si.WindowsSdkDir, bin_dir) if not self.pi.current_is_x86(): arch_subdir = self.pi.current_dir(x64=True) path = 'Bin%s' % arch_subdir - tools += [os.path.join(self.si.WindowsSdkDir, path)] + yield os.path.join(self.si.WindowsSdkDir, path) if self.vc_ver == 10.0 or self.vc_ver == 11.0: if self.pi.target_is_x86(): @@ -947,12 +1005,16 @@ class EnvironmentInfo: else: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) path = r'Bin\NETFX 4.0 Tools%s' % arch_subdir - tools += [os.path.join(self.si.WindowsSdkDir, path)] + yield os.path.join(self.si.WindowsSdkDir, path) - if self.si.WindowsSDKExecutablePath: - tools += [self.si.WindowsSDKExecutablePath] + elif self.vc_ver >= 15.0: + path = os.path.join(self.si.WindowsSdkDir, 'Bin') + arch_subdir = self.pi.current_dir(x64=True) + sdkver = self._get_content_dirname(path).rstrip('\\') + yield os.path.join(path, '%s%s' % (sdkver, arch_subdir)) - return tools + if self.si.WindowsSDKExecutablePath: + yield self.si.WindowsSDKExecutablePath @property def SdkSetup(self): @@ -1023,10 +1085,21 @@ class EnvironmentInfo: """ if self.vc_ver < 12.0: return [] + elif self.vc_ver < 15.0: + base_path = self.si.ProgramFilesx86 + arch_subdir = self.pi.current_dir(hidex86=True) + else: + base_path = self.si.VSInstallDir + arch_subdir = '' - arch_subdir = self.pi.current_dir(hidex86=True) path = r'MSBuild\%0.1f\bin%s' % (self.vc_ver, arch_subdir) - return [os.path.join(self.si.ProgramFilesx86, path)] + build = [os.path.join(base_path, path)] + + if self.vc_ver >= 15.0: + # Add Roslyn C# & Visual Basic Compiler + build += [os.path.join(base_path, path, 'Roslyn')] + + return build @property def HTMLHelpWorkshop(self): diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 799fb16..8bd2a49 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -312,6 +312,8 @@ class TestOptions: 'setup_requires = docutils>=0.3; spack ==1.1, ==1.3; there\n' 'dependency_links = http://some.com/here/1, ' 'http://some.com/there/2\n' + 'python_requires = >=1.0, !=2.8\n' + 'py_modules = module1, module2\n' ) with get_dist(tmpdir) as dist: assert dist.zip_safe @@ -340,6 +342,8 @@ class TestOptions: 'there' ]) assert dist.tests_require == ['mock==0.7.2', 'pytest'] + assert dist.python_requires == '>=1.0, !=2.8' + assert dist.py_modules == ['module1', 'module2'] def test_multiline(self, tmpdir): fake_env( diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 0000000..88a36c6 --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1,3 @@ +pytest-flake8 +pytest>=3.0.2 +backports.unittest_mock>=1.2 -- 2.34.1