Commit 76dc1b0b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Release buildout-1.7.1.post8.

Merge branch 'include_postrelease_string_in_version'
parents 09a84d6c b7cd5cad
1.7.1.post8
-----------
- Include '.postN' in generated egg's version so that version pinning with 'N.N.N.postN' works.
1.7.1.post7 1.7.1.post7
----------- -----------
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# #
############################################################################## ##############################################################################
name = "zc.buildout" name = "zc.buildout"
version = "1.7.1.post7" version = "1.7.1.post8"
import os import os
from setuptools import setup from setuptools import setup
......
...@@ -1082,7 +1082,6 @@ class Installer: ...@@ -1082,7 +1082,6 @@ class Installer:
ws = working_set ws = working_set
for requirement in requirements: for requirement in requirements:
if patch_dict and requirement.project_name in patch_dict:
self._env.scan( self._env.scan(
self.build(str(requirement), {}, patch_dict=patch_dict)) self.build(str(requirement), {}, patch_dict=patch_dict))
for dist in self._get_dist(requirement, ws, self._always_unzip): for dist in self._get_dist(requirement, ws, self._always_unzip):
...@@ -1189,11 +1188,16 @@ class Installer: ...@@ -1189,11 +1188,16 @@ class Installer:
base = os.path.dirname(setups[0]) base = os.path.dirname(setups[0])
setup_cfg_dict = {'build_ext':build_ext} setup_cfg_dict = {'build_ext':build_ext}
parsed_version = dist.parsed_version
if parsed_version.is_postrelease and \
dist.version.startswith(parsed_version.base_version):
tag_build = dist.version[len(parsed_version.base_version):]
else:
tag_build = ''
patch_dict = (patch_dict or {}).get(re.sub('[<>=].*', '', spec)) patch_dict = (patch_dict or {}).get(re.sub('[<>=].*', '', spec))
if patch_dict: if patch_dict:
setup_cfg_dict.update( tag_build += '+%s%03d' % (PATCH_MARKER,
{'egg_info':{'tag_build':'+%s%03d' % (PATCH_MARKER, patch_dict['patch_revision'])
patch_dict['patch_revision'])}})
for patch in patch_dict['patches']: for patch in patch_dict['patches']:
url, md5sum = (patch.strip().split('#', 1) + [''])[:2] url, md5sum = (patch.strip().split('#', 1) + [''])[:2]
download = zc.buildout.download.Download() download = zc.buildout.download.Download()
...@@ -1207,6 +1211,8 @@ class Installer: ...@@ -1207,6 +1211,8 @@ class Installer:
if popen.returncode != 0: if popen.returncode != 0:
raise subprocess.CalledProcessError( raise subprocess.CalledProcessError(
popen.returncode, ' '.join(args)) popen.returncode, ' '.join(args))
setup_cfg_dict.update(
{'egg_info':{'tag_build':tag_build}})
setup_cfg = os.path.join(base, 'setup.cfg') setup_cfg = os.path.join(base, 'setup.cfg')
if not os.path.exists(setup_cfg): if not os.path.exists(setup_cfg):
f = open(setup_cfg, 'w') f = open(setup_cfg, 'w')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment