Hello community,
here is the log from the commit of package python-zc.buildout for
openSUSE:Factory checked in at 2018-07-14 20:25:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zc.buildout (Old)
and /work/SRC/openSUSE:Factory/.python-zc.buildout.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-zc.buildout"
Sat Jul 14 20:25:47 2018 rev:8 rq:622788 version:2.12.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-zc.buildout/python-zc.buildout.changes
2018-05-29 10:38:13.827307405 +0200
+++
/work/SRC/openSUSE:Factory/.python-zc.buildout.new/python-zc.buildout.changes
2018-07-14 20:27:39.932562827 +0200
@@ -1,0 +2,13 @@
+Sat Jul 7 08:43:13 UTC 2018 - [email protected]
+
+- update to version 2.12.0:
+ - Add a new buildout option ``allow-unknown-extras`` to enable
+ installing requirements that specify extras that do not exist. This
+ needs a corresponding update to zc.recipe.egg. See `issue 457
+ <https://github.com/buildout/buildout/issues/457>`_.
+ zc.recipe.egg has been updated to 2.0.6 for this change.
+- update to version 2.11.5:
+ - Fix for `issue 295 <https://github.com/buildout/buildout/issues/295>`_. On
+ windows, deletion of temporary egg files is more robust now.
+
+-------------------------------------------------------------------
Old:
----
zc.buildout-2.11.4.tar.gz
New:
----
zc.buildout-2.12.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-zc.buildout.spec ++++++
--- /var/tmp/diff_new_pack.ABDCF3/_old 2018-07-14 20:27:40.628564613 +0200
+++ /var/tmp/diff_new_pack.ABDCF3/_new 2018-07-14 20:27:40.660564696 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{!?license: %global license %doc}
Name: python-zc.buildout
-Version: 2.11.4
+Version: 2.12.0
Release: 0
Url: http://pypi.python.org/pypi/zc.buildout
Summary: System for managing development buildouts
++++++ zc.buildout-2.11.4.tar.gz -> zc.buildout-2.12.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/CHANGES.rst
new/zc.buildout-2.12.0/CHANGES.rst
--- old/zc.buildout-2.11.4/CHANGES.rst 2018-05-14 23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/CHANGES.rst 2018-07-02 11:21:22.000000000 +0200
@@ -1,10 +1,28 @@
Change History
**************
+2.12.0 (2018-07-02)
+===================
+
+- Add a new buildout option ``allow-unknown-extras`` to enable
+ installing requirements that specify extras that do not exist. This
+ needs a corresponding update to zc.recipe.egg. See `issue 457
+ <https://github.com/buildout/buildout/issues/457>`_.
+
+ zc.recipe.egg has been updated to 2.0.6 for this change.
+
+
+2.11.5 (2018-06-19)
+===================
+
+- Fix for `issue 295 <https://github.com/buildout/buildout/issues/295>`_. On
+ windows, deletion of temporary egg files is more robust now.
+
+
2.11.4 (2018-05-14)
===================
-- Fix for `issue 451 <https://github.com/buildout/buildout/issues/451>`:
+- Fix for `issue 451 <https://github.com/buildout/buildout/issues/451>`_:
distributions with a version number that normalizes to a shorter version
number (3.3.0 to 3.3, for instance) can be installed now.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/PKG-INFO
new/zc.buildout-2.12.0/PKG-INFO
--- old/zc.buildout-2.11.4/PKG-INFO 2018-05-14 23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/PKG-INFO 2018-07-02 11:21:23.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zc.buildout
-Version: 2.11.4
+Version: 2.12.0
Summary: System for managing development buildouts
Home-page: http://buildout.org
Author: Jim Fulton
@@ -63,10 +63,28 @@
Change History
**************
+ 2.12.0 (2018-07-02)
+ ===================
+
+ - Add a new buildout option ``allow-unknown-extras`` to enable
+ installing requirements that specify extras that do not exist. This
+ needs a corresponding update to zc.recipe.egg. See `issue 457
+ <https://github.com/buildout/buildout/issues/457>`_.
+
+ zc.recipe.egg has been updated to 2.0.6 for this change.
+
+
+ 2.11.5 (2018-06-19)
+ ===================
+
+ - Fix for `issue 295
<https://github.com/buildout/buildout/issues/295>`_. On
+ windows, deletion of temporary egg files is more robust now.
+
+
2.11.4 (2018-05-14)
===================
- - Fix for `issue 451
<https://github.com/buildout/buildout/issues/451>`:
+ - Fix for `issue 451
<https://github.com/buildout/buildout/issues/451>`_:
distributions with a version number that normalizes to a shorter
version
number (3.3.0 to 3.3, for instance) can be installed now.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/setup.py
new/zc.buildout-2.12.0/setup.py
--- old/zc.buildout-2.11.4/setup.py 2018-05-14 23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/setup.py 2018-07-02 11:21:22.000000000 +0200
@@ -12,7 +12,7 @@
#
##############################################################################
name = "zc.buildout"
-version = '2.11.4'
+version = '2.12.0'
import os
from setuptools import setup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/zc.buildout-2.11.4/src/zc/buildout/allow-unknown-extras.txt
new/zc.buildout-2.12.0/src/zc/buildout/allow-unknown-extras.txt
--- old/zc.buildout-2.11.4/src/zc/buildout/allow-unknown-extras.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/zc.buildout-2.12.0/src/zc/buildout/allow-unknown-extras.txt
2018-07-02 11:21:22.000000000 +0200
@@ -0,0 +1,65 @@
+======================
+ Allow Unknown Extras
+======================
+
+Sometimes we need to allow unknown extras.
+
+The ``allow-unknown-extras`` option lets us do that in a buildout
+configuration, just as we can directly calling ``easy_install``
+works exactly like the one provided in ``easy_install``.
+
+Let's create a develop egg that requires a bogus extra.
+
+ >>> mkdir(sample_buildout, 'allowdemo')
+ >>> write(sample_buildout, 'allowdemo', 'dependencydemo.py',
+ ... 'import eggrecipekss.core')
+ >>> write(sample_buildout, 'allowdemo', 'setup.py',
+ ... '''from setuptools import setup; setup(
+ ... name='allowdemo', py_modules=['dependencydemo'],
+ ... zip_safe=True, version='1')
+ ... ''')
+
+Now let's configure the buildout to use the develop egg with a bogus extra.
+
+ >>> write(sample_buildout, 'buildout.cfg',
+ ... '''
+ ... [buildout]
+ ... develop = allowdemo
+ ... parts = eggs
+ ...
+ ... [eggs]
+ ... recipe = zc.recipe.egg:eggs
+ ... eggs = allowdemo[bad_extra]
+ ... ''')
+
+Now we can run the buildout and see that it fails:
+
+ >>> print_(system(buildout), end='') # doctest: +ELLIPSIS
+ Develop: '/sample-buildout/allowdemo'
+ Installing eggs...
+ ...
+ While:
+ Installing eggs.
+ Error: Couldn't find the required extra...
+
+If we flip the option on, the buildout succeeds
+
+ >>> write(sample_buildout, 'buildout.cfg',
+ ... '''
+ ... [buildout]
+ ... develop = allowdemo
+ ... parts = eggs
+ ... allow-unknown-extras = true
+ ...
+ ... [eggs]
+ ... recipe = zc.recipe.egg:eggs
+ ... eggs = allowdemo[bad_extra]
+ ... ''')
+
+
+Now we can run the buildout and only get a warning::
+
+ >>> print_(system(buildout), end='') # doctest: +ELLIPSIS
+ Develop: '/sample-buildout/allowdemo'
+ Installing eggs...
+ allowdemo 1 does not provide the extra 'bad_extra'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/src/zc/buildout/buildout.py
new/zc.buildout-2.12.0/src/zc/buildout/buildout.py
--- old/zc.buildout-2.11.4/src/zc/buildout/buildout.py 2018-05-14
23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/src/zc/buildout/buildout.py 2018-07-02
11:21:22.000000000 +0200
@@ -285,6 +285,7 @@
'socket-timeout': '',
'update-versions-file': '',
'use-dependency-links': 'true',
+ 'allow-unknown-extras': 'false',
}, 'DEFAULT_VALUE')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/src/zc/buildout/buildout.txt
new/zc.buildout-2.12.0/src/zc/buildout/buildout.txt
--- old/zc.buildout-2.11.4/src/zc/buildout/buildout.txt 2018-05-14
23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/src/zc/buildout/buildout.txt 2018-07-02
11:21:22.000000000 +0200
@@ -804,6 +804,8 @@
DEFAULT_VALUE
allow-picked-versions= true
DEFAULT_VALUE
+ allow-unknown-extras= false
+ DEFAULT_VALUE
bin-directory= bin
DEFAULT_VALUE
develop= recipes
@@ -882,6 +884,11 @@
AS DEFAULT_VALUE
SET VALUE = true
<BLANKLINE>
+ allow-unknown-extras= false
+ <BLANKLINE>
+ AS DEFAULT_VALUE
+ SET VALUE = false
+ <BLANKLINE>
bin-directory= bin
<BLANKLINE>
AS DEFAULT_VALUE
@@ -2775,6 +2782,7 @@
[buildout]
allow-hosts = *
allow-picked-versions = true
+ allow-unknown-extras = false
bin-directory = /sample-buildout/bin
develop-eggs-directory = /sample-buildout/develop-eggs
directory = /sample-buildout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/src/zc/buildout/easy_install.py
new/zc.buildout-2.12.0/src/zc/buildout/easy_install.py
--- old/zc.buildout-2.11.4/src/zc/buildout/easy_install.py 2018-05-14
23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/src/zc/buildout/easy_install.py 2018-07-02
11:21:22.000000000 +0200
@@ -35,6 +35,7 @@
import sys
import tempfile
import zc.buildout
+import zc.buildout.rmtree
import warnings
try:
@@ -62,7 +63,7 @@
logger = logging.getLogger('zc.buildout.easy_install')
url_match = re.compile('[a-z0-9+.-]+://').match
-is_source_encoding_line = re.compile('coding[:=]\s*([-\w.]+)').search
+is_source_encoding_line = re.compile(r'coding[:=]\s*([-\w.]+)').search
# Source encoding regex from http://www.python.org/dev/peps/pep-0263/
is_win32 = sys.platform == 'win32'
@@ -221,7 +222,7 @@
)
-class Installer:
+class Installer(object):
_versions = {}
_required_by = {}
@@ -232,6 +233,7 @@
_use_dependency_links = True
_allow_picked_versions = True
_store_required_by = False
+ _allow_unknown_extras = False
def __init__(self,
dest=None,
@@ -245,10 +247,12 @@
use_dependency_links=None,
allow_hosts=('*',),
check_picked=True,
+ allow_unknown_extras=False,
):
assert executable == sys.executable, (executable, sys.executable)
self._dest = dest if dest is None else
pkg_resources.normalize_path(dest)
self._allow_hosts = allow_hosts
+ self._allow_unknown_extras = allow_unknown_extras
if self._install_from_cache:
if not self._download_cache:
@@ -453,7 +457,7 @@
return result
finally:
- shutil.rmtree(tmp)
+ zc.buildout.rmtree.rmtree(tmp)
def _obtain(self, requirement, source=None):
# initialize out index for this project:
@@ -574,7 +578,7 @@
finally:
if tmp != self._download_cache:
- shutil.rmtree(tmp)
+ zc.buildout.rmtree.rmtree(tmp)
self._env_rescan_dest()
dist = self._env.best_match(requirement, ws)
@@ -732,7 +736,34 @@
pkg_resources.VersionConflict(dist, req), ws)
best[req.key] = dist
- extra_requirements = dist.requires(req.extras)[::-1]
+
+ missing_requested = sorted(
+ set(req.extras) - set(dist.extras)
+ )
+ for missing in missing_requested:
+ logger.warning(
+ '%s does not provide the extra \'%s\'',
+ dist, missing
+ )
+
+ if missing_requested:
+ if not self._allow_unknown_extras:
+ raise zc.buildout.UserError(
+ "Couldn't find the required extra. "
+ "This means the requirement is incorrect. "
+ "If the requirement is itself from software you "
+ "requested, then there might be a bug in "
+ "requested software. You can ignore this by "
+ "using 'allow-unknown-extras=true', however "
+ "that may simply cause needed software to be omitted."
+ )
+
+ extra_requirements = sorted(
+ set(dist.extras) & set(req.extras)
+ )
+ else:
+ extra_requirements = dist.requires(req.extras)[::-1]
+
for extra_requirement in extra_requirements:
self._requirements_and_constraints.append(
"Requirement of %s: %s" % (
@@ -804,11 +835,11 @@
return [dist.location for dist in dists]
finally:
- shutil.rmtree(build_tmp)
+ zc.buildout.rmtree.rmtree(build_tmp)
finally:
if tmp != self._download_cache:
- shutil.rmtree(tmp)
+ zc.buildout.rmtree.rmtree(tmp)
def _fix_file_links(self, links):
for link in links:
@@ -911,6 +942,7 @@
include_site_packages=None,
allowed_eggs_from_site_packages=None,
check_picked=True,
+ allow_unknown_extras=False,
):
assert executable == sys.executable, (executable, sys.executable)
assert include_site_packages is None
@@ -920,7 +952,8 @@
always_unzip, path,
newest, versions, use_dependency_links,
allow_hosts=allow_hosts,
- check_picked=check_picked)
+ check_picked=check_picked,
+ allow_unknown_extras=allow_unknown_extras)
return installer.install(specs, working_set)
buildout_and_setuptools_dists = list(install(['zc.buildout'], None,
@@ -945,7 +978,7 @@
def _rm(*paths):
for path in paths:
if os.path.isdir(path):
- shutil.rmtree(path)
+ zc.buildout.rmtree.rmtree(path)
elif os.path.exists(path):
os.remove(path)
@@ -1051,7 +1084,7 @@
)).encode())
tmp3 = tempfile.mkdtemp('build', dir=dest)
- undo.append(lambda : shutil.rmtree(tmp3))
+ undo.append(lambda : zc.buildout.rmtree.rmtree(tmp3))
args = [executable, tsetup, '-q', 'develop', '-mN', '-d', tmp3]
@@ -1738,5 +1771,5 @@
assert newdist is not None # newloc above is missing our dist?!
finally:
# Remember that temporary directories must be removed
- shutil.rmtree(tmp_dest)
+ zc.buildout.rmtree.rmtree(tmp_dest)
return newdist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/src/zc/buildout/easy_install.txt
new/zc.buildout-2.12.0/src/zc/buildout/easy_install.txt
--- old/zc.buildout-2.11.4/src/zc/buildout/easy_install.txt 2018-05-14
23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/src/zc/buildout/easy_install.txt 2018-07-02
11:21:22.000000000 +0200
@@ -86,6 +86,10 @@
allows scripts to work when scripts and eggs are moved, as long as
they are both moved in the same way.
+allow_unknown_extras
+ Install the requirements, even if one of them specifies an
+ extra not provided by the distribution.
+
The install method returns a working set containing the distributions
needed to meet the given requirements.
@@ -210,6 +214,32 @@
>>> rmdir(dest)
+Unknown extras
+--------------
+
+Attempting to install a requirement with an extra it doesn't provide
+is an error.
+
+ >>> ws = zc.buildout.easy_install.install(
+ ... ['demo[unknown_extra]'], dest, links=[link_server],
+ ... index=link_server+'index/')
+ Traceback (most recent call last):
+ ...
+ UserError: Couldn't find the required extra...
+
+We can pass the ``allow_unknown_extras`` argument to force the
+installation to proceed.
+
+ >>> ws = zc.buildout.easy_install.install(
+ ... ['demo[unknown_extra]'], dest, links=[link_server],
+ ... index=link_server+'index/',
+ ... allow_unknown_extras=True)
+
+ >>> ls(dest)
+ d demo-0.3-py2.4.egg
+
+ >>> rmdir(dest)
+
Case issues
-----------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/src/zc/buildout/rmtree.py
new/zc.buildout-2.12.0/src/zc/buildout/rmtree.py
--- old/zc.buildout-2.11.4/src/zc/buildout/rmtree.py 2018-05-14
23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/src/zc/buildout/rmtree.py 2018-07-02
11:21:22.000000000 +0200
@@ -16,13 +16,15 @@
import shutil
import os
import doctest
+import time
def rmtree (path):
"""
- A variant of shutil.rmtree which tries hard to be successful
+ A variant of shutil.rmtree which tries hard to be successful.
On windows shutil.rmtree aborts when it tries to delete a
- read only file.
- This tries to chmod the file to writeable and retries before giving up.
+ read only file or a file which is still handled by another
+ process (e.g. antivirus scanner). This tries to chmod the
+ file to writeable and retries 10 times before giving up.
>>> from tempfile import mkdtemp
@@ -55,7 +57,16 @@
"""
def retry_writeable (func, path, exc):
os.chmod (path, 384) # 0600
- func (path)
+ for i in range(10):
+ try:
+ func (path)
+ break
+ except OSError:
+ time.sleep(0.1)
+ else:
+ # tried 10 times without success, thus
+ # finally rethrow the last exception
+ raise
shutil.rmtree (path, onerror = retry_writeable)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/src/zc/buildout/tests.py
new/zc.buildout-2.12.0/src/zc/buildout/tests.py
--- old/zc.buildout-2.11.4/src/zc/buildout/tests.py 2018-05-14
23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/src/zc/buildout/tests.py 2018-07-02
11:21:22.000000000 +0200
@@ -3712,7 +3712,7 @@
doctest.DocFileSuite(
'easy_install.txt', 'downloadcache.txt', 'dependencylinks.txt',
- 'allowhosts.txt',
+ 'allowhosts.txt', 'allow-unknown-extras.txt',
setUp=easy_install_SetUp,
tearDown=zc.buildout.testing.buildoutTearDown,
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
@@ -3730,7 +3730,7 @@
(re.compile(r'\\[\\]?'), '/'),
(re.compile('(\n?)- ([a-zA-Z_.-]+)\n- \\2.exe\n'),
'\\1- \\2\n'),
- ]+(sys.version_info < (2, 5) and [
+ ]+(sys.version_info < (2, 5) and [
(re.compile('.*No module named runpy.*', re.S), ''),
(re.compile('.*usage: pdb.py scriptfile .*', re.S), ''),
(re.compile('.*Error: what does not exist.*', re.S), ''),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zc.buildout-2.11.4/src/zc.buildout.egg-info/PKG-INFO
new/zc.buildout-2.12.0/src/zc.buildout.egg-info/PKG-INFO
--- old/zc.buildout-2.11.4/src/zc.buildout.egg-info/PKG-INFO 2018-05-14
23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/src/zc.buildout.egg-info/PKG-INFO 2018-07-02
11:21:23.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zc.buildout
-Version: 2.11.4
+Version: 2.12.0
Summary: System for managing development buildouts
Home-page: http://buildout.org
Author: Jim Fulton
@@ -63,10 +63,28 @@
Change History
**************
+ 2.12.0 (2018-07-02)
+ ===================
+
+ - Add a new buildout option ``allow-unknown-extras`` to enable
+ installing requirements that specify extras that do not exist. This
+ needs a corresponding update to zc.recipe.egg. See `issue 457
+ <https://github.com/buildout/buildout/issues/457>`_.
+
+ zc.recipe.egg has been updated to 2.0.6 for this change.
+
+
+ 2.11.5 (2018-06-19)
+ ===================
+
+ - Fix for `issue 295
<https://github.com/buildout/buildout/issues/295>`_. On
+ windows, deletion of temporary egg files is more robust now.
+
+
2.11.4 (2018-05-14)
===================
- - Fix for `issue 451
<https://github.com/buildout/buildout/issues/451>`:
+ - Fix for `issue 451
<https://github.com/buildout/buildout/issues/451>`_:
distributions with a version number that normalizes to a shorter
version
number (3.3.0 to 3.3, for instance) can be installed now.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/zc.buildout-2.11.4/src/zc.buildout.egg-info/SOURCES.txt
new/zc.buildout-2.12.0/src/zc.buildout.egg-info/SOURCES.txt
--- old/zc.buildout-2.11.4/src/zc.buildout.egg-info/SOURCES.txt 2018-05-14
23:56:36.000000000 +0200
+++ new/zc.buildout-2.12.0/src/zc.buildout.egg-info/SOURCES.txt 2018-07-02
11:21:23.000000000 +0200
@@ -21,6 +21,7 @@
src/zc.buildout.egg-info/requires.txt
src/zc.buildout.egg-info/top_level.txt
src/zc/buildout/__init__.py
+src/zc/buildout/allow-unknown-extras.txt
src/zc/buildout/allowhosts.txt
src/zc/buildout/bootstrap.txt
src/zc/buildout/bootstrap_cl_settings.test