Skip to content

Commit

Permalink
Migrate constants from setup.py to setup.cfg
Browse files Browse the repository at this point in the history
This also makes wheel an unconditional setup_requires dependency.

Closes: pypa#1697
  • Loading branch information
venthur authored and pganssle committed May 15, 2019
1 parent 6310f99 commit 5e7acb4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 52 deletions.
42 changes: 41 additions & 1 deletion setup.cfg
Expand Up @@ -18,5 +18,45 @@ formats = zip
universal = 1

[metadata]
license_file = LICENSE
name = setuptools
version = 41.0.1
description = Easily download, build, install, upgrade, and uninstall Python packages
author = Python Packaging Authority
author_email = distutils-sig@python.org
long_description = file: README.rst
long_description_content_type = text/x-rst; charset=UTF-8
license_file = LICENSE
keywords = CPAN, PyPI, distutils, eggs, package, management
url = https://github.com/pypa/setuptools
project_urls =
Documentation = https://setuptools.readthedocs.io/
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Topic :: Software Development :: Libraries :: Python Modules
Topic :: System :: Archiving :: Packaging
Topic :: System :: Systems Administration
Topic :: Utilities

[options]
zip_safe = True
python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
setup_requires = wheel
py_modules = easy_install
packages = find:

[options.packages.find]
exclude = *.tests

[options.extras_require]
ssl = wincertstore==0.2; sys_platform=='win32'
certs = certifi==2016.9.26
51 changes: 0 additions & 51 deletions setup.py
Expand Up @@ -3,10 +3,8 @@
Distutils setup file, used to install or test 'setuptools'
"""

import io
import os
import sys
import textwrap

import setuptools

Expand Down Expand Up @@ -49,10 +47,6 @@ def _gen_console_scripts():
yield tmpl.format(shortver=sys.version[:3])


readme_path = os.path.join(here, 'README.rst')
with io.open(readme_path, encoding='utf-8') as readme_file:
long_description = readme_file.read()

package_data = dict(
setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'],
)
Expand All @@ -72,9 +66,6 @@ def _gen_console_scripts():
package_data.setdefault('setuptools', []).extend(['*.exe'])
package_data.setdefault('setuptools.command', []).extend(['*.xml'])

needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv)
wheel = ['wheel'] if needs_wheel else []


def pypi_link(pkg_filename):
"""
Expand All @@ -88,25 +79,8 @@ def pypi_link(pkg_filename):


setup_params = dict(
name="setuptools",
description=(
"Easily download, build, install, upgrade, and uninstall "
"Python packages"
),
author="Python Packaging Authority",
author_email="distutils-sig@python.org",
long_description=long_description,
long_description_content_type='text/x-rst; charset=UTF-8',
keywords="CPAN PyPI distutils eggs package management",
url="https://github.com/pypa/setuptools",
project_urls={
"Documentation": "https://setuptools.readthedocs.io/",
},
src_root=None,
packages=setuptools.find_packages(exclude=['*.tests']),
package_data=package_data,
py_modules=['easy_install'],
zip_safe=True,
entry_points={
"distutils.commands": [
"%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals()
Expand Down Expand Up @@ -152,28 +126,6 @@ def pypi_link(pkg_filename):
"setuptools.installation":
['eggsecutable = setuptools.command.easy_install:bootstrap'],
},
classifiers=textwrap.dedent("""
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Topic :: Software Development :: Libraries :: Python Modules
Topic :: System :: Archiving :: Packaging
Topic :: System :: Systems Administration
Topic :: Utilities
""").strip().splitlines(),
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
extras_require={
"ssl:sys_platform=='win32'": "wincertstore==0.2",
"certs": "certifi==2016.9.26",
},
dependency_links=[
pypi_link(
'certifi-2016.9.26.tar.gz#md5=baa81e951a29958563689d868ef1064d',
Expand All @@ -182,9 +134,6 @@ def pypi_link(pkg_filename):
'wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2',
),
],
scripts=[],
setup_requires=[
] + wheel,
)

if __name__ == '__main__':
Expand Down

0 comments on commit 5e7acb4

Please sign in to comment.