diff --git a/fix-sle11-test-failure.patch b/fix-sle11-test-failure.patch new file mode 100644 index 0000000..a68647a --- /dev/null +++ b/fix-sle11-test-failure.patch @@ -0,0 +1,17 @@ +This fixes a test failure on SLE11SP3: +Error is: +AssertionError: error: must supply either home or prefix/exec-prefix -- not both + +Index: setuptools-15.0/setuptools/tests/test_egg_info.py +=================================================================== +--- setuptools-15.0.orig/setuptools/tests/test_egg_info.py ++++ setuptools-15.0/setuptools/tests/test_egg_info.py +@@ -61,7 +61,7 @@ class TestEggInfo: + ) + cmd = [ + 'install', +- '--home', env.paths['home'], ++ '--prefix', env.paths['home'], + '--install-lib', env.paths['lib'], + '--install-scripts', env.paths['scripts'], + '--install-data', env.paths['data'], diff --git a/fix-type-error.patch b/fix-type-error.patch new file mode 100644 index 0000000..4005444 --- /dev/null +++ b/fix-type-error.patch @@ -0,0 +1,20 @@ +changeset: 3811:6b535d850b40 +branch: fix-type-error-skip-reason +tag: tip +user: Thomas Bechtold +date: Sun Apr 05 08:39:18 2015 +0200 +summary: Fix TypeError for pytest.skip() + +diff -r ef4e6f655dc0 -r 6b535d850b40 setuptools/tests/test_integration.py +--- a/setuptools/tests/test_integration.py Sun Apr 05 06:35:14 2015 +0000 ++++ b/setuptools/tests/test_integration.py Sun Apr 05 08:39:18 2015 +0200 +@@ -28,7 +28,7 @@ + try: + urlopen('https://pypi.python.org/pypi') + except Exception as exc: +- pytest.skip(reason=str(exc)) ++ pytest.skip(str(exc)) + + + @pytest.fixture + diff --git a/python-setuptools.changes b/python-setuptools.changes index ab5f74b..143cec0 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,214 @@ +------------------------------------------------------------------- +Fri Mar 27 14:30:44 UTC 2015 - tbechtold@suse.com + +- update to 15.0: + * Pull Request #126: DistributionNotFound message now lists the package or + packages that required it. E.g.:: + pkg_resources.DistributionNotFound: The 'colorama>=0.3.1' distribution + was not found and is required by smlib.log. + Note that zc.buildout once dependended on the string rendering of this + message to determine the package that was not found. This expectation + has since been changed, but older versions of buildout may experience + problems. See Buildout #242 for details. + * Issue #307: Removed PEP-440 warning during parsing of versions + in ``pkg_resources.Distribution``. + * Issue #364: Replace deprecated usage with recommended usage of + ``EntryPoint.load``. + * Issue #254: When creating temporary egg cache on Unix, use mode 755 + for creating the directory to avoid the subsequent warning if + the directory is group writable. + * Issue #137: Update ``Distribution.hashcmp`` so that Distributions with + None for pyversion or platform can be compared against Distributions + defining those attributes. + * Issue #360: Removed undesirable behavior from test runs, preventing + write tests and installation to system site packages. + * Pull Request #125: Add ``__ne__`` to Requirement class. + * Various refactoring of easy_install. + * Bootstrap script now accepts ``--to-dir`` to customize save directory or + allow for re-use of existing repository of setuptools versions. See + Pull Request #112 for background. + * Issue #285: ``easy_install`` no longer will default to installing + packages to the "user site packages" directory if it is itself installed + there. Instead, the user must pass ``--user`` in all cases to install + packages to the user site packages. + This behavior now matches that of "pip install". To configure + an environment to always install to the user site packages, consider + using the "install-dir" and "scripts-dir" parameters to easy_install + through an appropriate distutils config file. + * Issue #359: Include pytest.ini in the sdist so invocation of py.test on the + sdist honors the pytest configuration. + Re-release of 13.0. Intermittent connectivity issues caused the release + process to fail and PyPI uploads no longer accept files for 13.0. + * Issue #356: Back out Pull Request #119 as it requires Setuptools 10 or later + as the source during an upgrade. + * Removed build_py class from setup.py. According to 892f439d216e, this + functionality was added to support upgrades from old Distribute versions, + 0.6.5 and 0.6.6. + * Pull Request #119: Restore writing of ``setup_requires`` to metadata + (previously added in 8.4 and removed in 9.0). + * Documentation is now linked using the rst.linker package. + * Fix ``setuptools.command.easy_install.extract_wininst_cfg()`` + with Python 2.6 and 2.7. + * Issue #354. Added documentation on building setuptools + documentation. + * Issue #345: Unload all modules under pkg_resources during + ``ez_setup.use_setuptools()``. + * Issue #336: Removed deprecation from ``ez_setup.use_setuptools``, + as it is clearly still used by buildout's bootstrap. ``ez_setup`` + remains deprecated for use by individual packages. + * Simplified implementation of ``ez_setup.use_setuptools``. + * Pull Request #118: Soften warning for non-normalized versions in + Distribution. + * Issue #339: Correct Attribute reference in ``cant_write_to_target``. + * Issue #336: Deprecated ``ez_setup.use_setuptools``. + * Issue #335: Fix script header generation on Windows. + * Fixed incorrect class attribute in ``install_scripts``. Tests would be nice. + * Issue #331: Fixed ``install_scripts`` command on Windows systems corrupting + the header. + * Restore ``setuptools.command.easy_install.sys_executable`` for pbr + compatibility. For the future, tools should construct a CommandSpec + explicitly. + * Issue #188: Setuptools now support multiple entities in the value for + ``build.executable``, such that an executable of "/usr/bin/env my-python" may + be specified. This means that systems with a specified executable whose name + has spaces in the path must be updated to escape or quote that value. + * Deprecated ``easy_install.ScriptWriter.get_writer``, replaced by ``.best()`` + with slightly different semantics (no force_windows flag). + * Issue #327: Formalize and restore support for any printable character in an + entry point name. + * Expose ``EntryPoint.resolve`` in place of EntryPoint._load, implementing the + simple, non-requiring load. Deprecated all uses of ``EntryPoint._load`` + except for calling with no parameters, which is just a shortcut for + ``ep.require(); ep.resolve();``. + Apps currently invoking ``ep.load(require=False)`` should instead do the + following if wanting to avoid the deprecating warning:: + getattr(ep, "resolve", lambda: ep.load(require=False))() + * Pip #2326: Report deprecation warning at stacklevel 2 for easier diagnosis. + * Issue #281: Since Setuptools 6.1 (Issue #268), a ValueError would be raised + in certain cases where VersionConflict was raised with two arguments, which + occurred in ``pkg_resources.WorkingSet.find``. This release adds support + for indicating the dependent packages while maintaining support for + a VersionConflict when no dependent package context is known. New unit tests + now capture the expected interface. + * Interop #3: Upgrade to Packaging 15.0; updates to PEP 440 so that >1.7 does + not exclude 1.7.1 but does exclude 1.7.0 and 1.7.0.post1. + * Issue #323: Fix regression in entry point name parsing. + * Deprecated use of EntryPoint.load(require=False). Passing a boolean to a + function to select behavior is an anti-pattern. Instead use + ``Entrypoint._load()``. + * Substantial refactoring of all unit tests. Tests are now much leaner and + re-use a lot of fixtures and contexts for better clarity of purpose. + * Issue #320: Added a compatibility implementation of + ``sdist._default_revctrl`` + so that systems relying on that interface do not fail (namely, Ubuntu 12.04 + and similar Debian releases). + * Issue #319: Fixed issue installing pure distutils packages. + * Issue #313: Removed built-in support for subversion. Projects wishing to + retain support for subversion will need to use a third party library. The + extant implementation is being ported to `setuptools_svn + `_. + * Issue #315: Updated setuptools to hide its own loaded modules during + installation of another package. This change will enable setuptools to + upgrade (or downgrade) itself even when its own metadata and implementation + change. + * Prefer vendored packaging library `as recommended + `_. + * Issue #312: Restored presence of pkg_resources API tests (doctest) to sdist. + * Issue #314: Disabled support for ``setup_requires`` metadata to avoid issue + where Setuptools was unable to upgrade over earlier versions. + * Pull Request #106: Now write ``setup_requires`` metadata. + * Issue #311: Decoupled pkg_resources from setuptools once again. + ``pkg_resources`` is now a package instead of a module. + * Issue #306: Suppress warnings about Version format except in select scenarios + (such as installation). + * Pull Request #85: Search egg-base when adding egg-info to manifest. + * Upgrade ``packaging`` to 14.5, giving preference to "rc" as designator for + release candidates over "c". + * PEP-440 warnings are now raised as their own class, + ``pkg_resources.PEP440Warning``, instead of RuntimeWarning. + * Disabled warnings on empty versions. + * Upgrade ``packaging`` to 14.4, fixing an error where there is a + different result for if 2.0.5 is contained within >2.0dev and >2.0.dev even + though normalization rules should have made them equal. + * Issue #296: Add warning when a version is parsed as legacy. This warning will + make it easier for developers to recognize deprecated version numbers. + * Issue #296: Restored support for ``__hash__`` on parse_version results. + * Issue #296: Restored support for ``__getitem__`` and sort operations on + parse_version result. + * Issue #296: Restore support for iteration over parse_version result, but + deprecated that usage with a warning. Fixes failure with buildout. + * Implement `PEP 440 `_ within + pkg_resources and setuptools. This change + deprecates some version numbers such that they will no longer be installable + without using the ``===`` escape hatch. See `the changes to test_resources + `_ + for specific examples of version numbers and specifiers that are no longer + supported. Setuptools now "vendors" the `packaging + `_ library. + * Issue #80, Issue #209: Eggs that are downloaded for ``setup_requires``, + ``test_requires``, etc. are now placed in a ``./.eggs`` directory instead of + directly in the current directory. This choice of location means the files + can be readily managed (removed, ignored). Additionally, + later phases or invocations of setuptools will not detect the package as + already installed and ignore it for permanent install (See #209). + This change is indicated as backward-incompatible as installations that + depend on the installation in the current directory will need to account for + the new location. Systems that ignore ``*.egg`` will probably need to be + adapted to ignore ``.eggs``. The files will need to be manually moved or + will be retrieved again. Most use cases will require no attention. + * Issue #268: When resolving package versions, a VersionConflict now reports + which package previously required the conflicting version. + * Issue #262: Fixed regression in pip install due to egg-info directories + being omitted. Re-opens Issue #118. + * Issue #259: Fixed regression with namespace package handling on ``single + version, externally managed`` installs. + * Issue #100: When building a distribution, Setuptools will no longer match + default files using platform-dependent case sensitivity, but rather will + only match the files if their case matches exactly. As a result, on Windows + and other case-insensitive file systems, files with names such as + 'readme.txt' or 'README.TXT' will be omitted from the distribution and a + warning will be issued indicating that 'README.txt' was not found. Other + filenames affected are: + - README.rst + - README + - setup.cfg + - setup.py (or the script name) + - test/test*.py + Any users producing distributions with filenames that match those above + case-insensitively, but not case-sensitively, should rename those files in + their repository for better portability. + * Pull Request #72: When using ``single_version_externally_managed``, the + exclusion list now includes Python 3.2 ``__pycache__`` entries. + * Pull Request #76 and Pull Request #78: lines in top_level.txt are now + ordered deterministically. + * Issue #118: The egg-info directory is now no longer included in the list + of outputs. + * Issue #258: Setuptools now patches distutils msvc9compiler to + recognize the specially-packaged compiler package for easy extension module + support on Python 2.6, 2.7, and 3.2. + * Issue #237: ``pkg_resources`` now uses explicit detection of Python 2 vs. + Python 3, supporting environments where builtins have been patched to make + Python 3 look more like Python 2. + * Issue #240: Based on real-world performance measures against 5.4, zip + manifests are now cached in all circumstances. The + ``PKG_RESOURCES_CACHE_ZIP_MANIFESTS`` environment variable is no longer + relevant. The observed "memory increase" referenced in the 5.4 release + notes and detailed in Issue #154 was likely not an increase over the status + quo, but rather only an increase over not storing the zip info at all. + * Issue #242: Use absolute imports in svn_utils to avoid issues if the + installing package adds an xml module to the path. + * Issue #239: Fix typo in 5.5 such that fix did not take. + * Issue #239: Setuptools now includes the setup_requires directive on + Distribution objects and validates the syntax just like install_requires + and tests_require directives. + * Issue #236: Corrected regression in execfile implementation for Python 2.6. +- Enable testsuite run during build. Added BuildRequires needed for that +- Refresh setuptools-5.4.1-create-sitedir.patch +- Add fix-type-error.patch: Fix error during test run +- Add fix-sle11-test-failure.patch: Fix error during test run on SLE11SP3 + ------------------------------------------------------------------- Wed Jul 23 08:54:56 UTC 2014 - sleep_walker@suse.cz diff --git a/python-setuptools.spec b/python-setuptools.spec index 31c16e5..78416a7 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -1,7 +1,7 @@ # # spec file for package python-setuptools # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-setuptools -Version: 5.4.1 +Version: 15.0 Release: 0 Url: http://pypi.python.org/pypi/setuptools Summary: Easily download, build, install, upgrade, and uninstall Python packages @@ -27,9 +27,18 @@ Source: https://pypi.python.org/packages/source/s/setuptools/setuptools- Source1: psfl.txt Source2: zpl.txt Patch1: setuptools-5.4.1-create-sitedir.patch +# NOTE(toabctl): patch submitted upstream +# See https://bitbucket.org/pypa/setuptools/pull-request/127/fix-typeerror-for-pytestskip/ +Patch2: fix-type-error.patch +# NOTE(toabctl): Fix for SLE11SP3 test failures +Patch3: fix-sle11-test-failure.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel BuildRequires: python-xml +# for tests +BuildRequires: python-mock +BuildRequires: python-pytest +BuildRequires: python-pytest-runner # needed for SLE Requires: python Requires: python-xml @@ -53,6 +62,10 @@ especially ones that have dependencies on other packages. %prep %setup -q -n setuptools-%{version} %patch1 -p1 +%patch2 -p1 +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%patch3 -p1 +%endif find . -type f -name "*.orig" -delete %build @@ -65,6 +78,10 @@ mkdir -p %{buildroot}%{_sysconfdir}/alternatives touch %{buildroot}%{_sysconfdir}/alternatives/easy_install ln -sf %{_sysconfdir}/alternatives/easy_install %{buildroot}/%{_bindir}/easy_install +%check +export LANG="en_US.UTF-8" +python setup.py ptr --addopts='-rxs' + %post update-alternatives \ --install %{_bindir}/easy_install easy_install %{_bindir}/easy_install-%{py_ver} 20 @@ -84,6 +101,6 @@ fi %{python_sitelib}/setuptools %{python_sitelib}/setuptools-%{version}-py%{py_ver}.egg-info %{python_sitelib}/easy_install.py* -%{python_sitelib}/pkg_resources.py* +%{python_sitelib}/pkg_resources %changelog diff --git a/setuptools-15.0.tar.gz b/setuptools-15.0.tar.gz new file mode 100644 index 0000000..b3a3845 --- /dev/null +++ b/setuptools-15.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:718d13adf87f99a45835bb20e0a1c4c036de644cd32b3f112639403aa04ebeb5 +size 627831 diff --git a/setuptools-5.4.1-create-sitedir.patch b/setuptools-5.4.1-create-sitedir.patch index f9002cb..c6ab01f 100644 --- a/setuptools-5.4.1-create-sitedir.patch +++ b/setuptools-5.4.1-create-sitedir.patch @@ -1,8 +1,8 @@ -Index: setuptools-5.4.1/setuptools/command/easy_install.py +Index: setuptools-15.0/setuptools/command/easy_install.py =================================================================== ---- setuptools-5.4.1.orig/setuptools/command/easy_install.py -+++ setuptools-5.4.1/setuptools/command/easy_install.py -@@ -405,6 +405,13 @@ class easy_install(Command): +--- setuptools-15.0.orig/setuptools/command/easy_install.py ++++ setuptools-15.0/setuptools/command/easy_install.py +@@ -415,6 +415,13 @@ class easy_install(Command): instdir = normalize_path(self.install_dir) pth_file = os.path.join(instdir, 'easy-install.pth') diff --git a/setuptools-5.4.1.tar.gz b/setuptools-5.4.1.tar.gz deleted file mode 100644 index 13b2a0e..0000000 --- a/setuptools-5.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:41194dc283bd186d5a7825c16b89d88bee369a6c4c4c7494e84909933b6f63be -size 782761