diff options
| -rw-r--r-- | CHANGES.rst | 10 | ||||
| -rwxr-xr-x | setuptools/command/easy_install.py | 2 | ||||
| -rwxr-xr-x | setuptools/command/sdist.py | 11 | ||||
| -rw-r--r-- | setuptools/tests/test_easy_install.py | 2 | ||||
| -rw-r--r-- | tox.ini | 1 |
5 files changed, 26 insertions, 0 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index cd203952..065c77ba 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,9 +2,19 @@ CHANGES ======= +v26.0.0 +------- + +* #748: By default, sdists are now produced in gzipped tarfile + format by default on all platforms, adding forward compatibility + for the same behavior in Python 3.6 (See Python #27819). + v25.4.0 ------- +* #459 via #736: On Windows systems, sys.argv[0] now correctly becomes the + name of entry point. + * Add Extension(py_limited_api=True). When set to a truthy value, that extension gets a filename apropriate for code using Py_LIMITED_API. When used correctly this allows a single compiled extension to work on diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ae9079d8..5065661f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2018,10 +2018,12 @@ class ScriptWriter(object): template = textwrap.dedent(""" # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r __requires__ = %(spec)r + import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point(%(spec)r, %(group)r, %(name)r)() ) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index b6125f58..1d4f5d54 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -66,6 +66,17 @@ class sdist(orig.sdist): if data not in dist_files: dist_files.append(data) + def initialize_options(self): + orig.sdist.initialize_options(self) + + self._default_to_gztar() + + def _default_to_gztar(self): + # only needed on Python prior to 3.6. + if sys.version_info >= (3, 6, 0, 'beta', 1): + return + self.formats = ['gztar'] + def make_distribution(self): """ Workaround for #516 diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index da0a355c..82e1d7e8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -74,10 +74,12 @@ class TestEasyInstallTest: expected = header + DALS(""" # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' __requires__ = 'spec' + import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('spec', 'console_scripts', 'name')() ) @@ -2,4 +2,5 @@ envlist = py26,py27,py33,py34,py35,pypy,pypy3 [testenv] +passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir commands=python setup.py test |
