From b4a0c62c24f332dc0b7849f8e4b6675552d1203c Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Mon, 3 Nov 2014 14:06:44 +0000 Subject: Make egg_info command write out setup requirements This commit makes the egg_info command write out setup requirements as well as install requirements, setup requirements are written to a setup_requires.txt file. The commit adds a new function write_setup_requirements which uses the existing _write_requirements function to write setup requirements out to a file and adds a new entry point to the egg_info.writers group. --- setup.py | 1 + 1 file changed, 1 insertion(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index bac4e29d..ca312c01 100755 --- a/setup.py +++ b/setup.py @@ -163,6 +163,7 @@ setup_params = dict( "egg_info.writers": [ "PKG-INFO = setuptools.command.egg_info:write_pkg_info", "requires.txt = setuptools.command.egg_info:write_requirements", + "setup_requires.txt = setuptools.command.egg_info:write_setup_requirements", "entry_points.txt = setuptools.command.egg_info:write_entries", "eager_resources.txt = setuptools.command.egg_info:overwrite_arg", "namespace_packages.txt = setuptools.command.egg_info:overwrite_arg", -- cgit v1.2.1 From 79a0c55d8c09d3fdd68157faa8658ecd85aa5d45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Dec 2014 16:51:28 -0500 Subject: Moved pkg_resources into its own package. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index bac4e29d..ff519e3e 100755 --- a/setup.py +++ b/setup.py @@ -128,7 +128,7 @@ setup_params = dict( packages=setuptools.find_packages(), package_data=package_data, - py_modules=['pkg_resources', 'easy_install'], + py_modules=['easy_install'], zip_safe=True, -- cgit v1.2.1 From a7e5648bda737683c4ad220e61c44c1d17b73d87 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Dec 2014 18:25:45 -0500 Subject: Removed svn support from setuptools. Ref #313. --- setup.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index ff519e3e..ca0b6c4b 100755 --- a/setup.py +++ b/setup.py @@ -172,9 +172,6 @@ setup_params = dict( ], "console_scripts": console_scripts, - "setuptools.file_finders": - ["svn_cvs = setuptools.command.sdist:_default_revctrl"], - "setuptools.installation": ['eggsecutable = setuptools.command.easy_install:bootstrap'], }, -- cgit v1.2.1 From 9c24e096d0a4b1a50148e2373a3fc18fa41eb69d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Dec 2014 15:05:21 -0500 Subject: Remove setup_requirements writer from metadata. Fixes #314. --- setup.py | 1 - 1 file changed, 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 56a071de..ff519e3e 100755 --- a/setup.py +++ b/setup.py @@ -163,7 +163,6 @@ setup_params = dict( "egg_info.writers": [ "PKG-INFO = setuptools.command.egg_info:write_pkg_info", "requires.txt = setuptools.command.egg_info:write_requirements", - "setup_requires.txt = setuptools.command.egg_info:write_setup_requirements", "entry_points.txt = setuptools.command.egg_info:write_entries", "eager_resources.txt = setuptools.command.egg_info:overwrite_arg", "namespace_packages.txt = setuptools.command.egg_info:overwrite_arg", -- cgit v1.2.1 From dce270b4271ad6607c28103c9199303121b52015 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 29 Dec 2014 23:40:30 -0500 Subject: Make sure to monkey-patch the easy_install module in the setup context. Fixes the other former test failure. Ref #315. --- setup.py | 1 + 1 file changed, 1 insertion(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index ff519e3e..937b5794 100755 --- a/setup.py +++ b/setup.py @@ -210,6 +210,7 @@ setup_params = dict( tests_require=[ 'setuptools[ssl]', 'pytest', + 'mock', ], setup_requires=[ ] + pytest_runner, -- cgit v1.2.1 From ede1df71401a16c74dea9c1962bd1085538ac3d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 30 Dec 2014 11:22:57 -0500 Subject: Remove changes file from long_description. --- setup.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index f441815f..544f18f5 100755 --- a/setup.py +++ b/setup.py @@ -90,15 +90,8 @@ class test(_test): readme_file = io.open('README.txt', encoding='utf-8') -# The release script adds hyperlinks to issues, -# but if the release script has not run, fall back to the source file -changes_names = 'CHANGES (links).txt', 'CHANGES.txt' -changes_fn = next(iter(filter(os.path.exists, changes_names))) -changes_file = io.open(changes_fn, encoding='utf-8') - with readme_file: - with changes_file: - long_description = readme_file.read() + '\n' + changes_file.read() + long_description = readme_file.read() package_data = { 'setuptools': ['script (dev).tmpl', 'script.tmpl', 'site-patch.py']} -- cgit v1.2.1 From 9875a7b2586d737ac4d2294044187e17e5533e35 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 30 Dec 2014 12:57:30 -0500 Subject: Remove support for setup.py test. Use the recommended test runner (setup.py ptr). --- setup.py | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 544f18f5..b4b93b38 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,6 @@ import io import os import sys import textwrap -import contextlib # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -27,7 +26,6 @@ with open(ver_path) as ver_file: import setuptools from setuptools.command.build_py import build_py as _build_py -from setuptools.command.test import test as _test scripts = [] @@ -61,32 +59,6 @@ class build_py(_build_py): outf, copied = self.copy_file(srcfile, target) srcfile = os.path.abspath(srcfile) -class test(_test): - """Specific test class to avoid rewriting the entry_points.txt""" - def run(self): - with self._save_entry_points(): - _test.run(self) - - @contextlib.contextmanager - def _save_entry_points(self): - entry_points = os.path.join('setuptools.egg-info', 'entry_points.txt') - - if not os.path.exists(entry_points): - yield - return - - # save the content - with open(entry_points, 'rb') as f: - ep_content = f.read() - - # run the tests - try: - yield - finally: - # restore the file - with open(entry_points, 'wb') as f: - f.write(ep_content) - readme_file = io.open('README.txt', encoding='utf-8') @@ -116,7 +88,6 @@ setup_params = dict( long_description=long_description, keywords="CPAN PyPI distutils eggs package management", url="https://bitbucket.org/pypa/setuptools", - test_suite='setuptools.tests', src_root=src_root, packages=setuptools.find_packages(), package_data=package_data, @@ -125,7 +96,6 @@ setup_params = dict( zip_safe=True, - cmdclass={'test': test}, entry_points={ "distutils.commands": [ "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() -- cgit v1.2.1