Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit python-virtualenv-clone for openSUSE:Factory
Hello community,

here is the log from the commit of package python-virtualenv-clone for
openSUSE:Factory checked in at 2019-04-14 12:22:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-virtualenv-clone (Old)
and /work/SRC/openSUSE:Factory/.python-virtualenv-clone.new.27019 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-virtualenv-clone"

Sun Apr 14 12:22:36 2019 rev:10 rq:693640 version:0.5.3

Changes:
--------
---
/work/SRC/openSUSE:Factory/python-virtualenv-clone/python-virtualenv-clone.changes
2018-12-24 11:45:55.521211094 +0100
+++
/work/SRC/openSUSE:Factory/.python-virtualenv-clone.new.27019/python-virtualenv-clone.changes
2019-04-14 12:22:38.947777462 +0200
@@ -1,0 +2,15 @@
+Fri Apr 12 06:28:38 UTC 2019 - Marketa Calabkova <mcalabkova@xxxxxxxx>
+
+- update to version 0.5.3
+ 0.5.?
+ * Fixed incorrect Python version value.
+ * Added support for Python 3.7.
+ 0.4.0
+ * Dropped support for EOL Python versions that no longer
+ receive any updates from the core CPython team.
+ 0.3.0
+ * Added support for Python 3.
+ * Fixed a bug with writing unicode in .pth files incorrectly.
+ * Fixed support for paths involving symbolic links.
+
+-------------------------------------------------------------------

Old:
----
virtualenv-clone-0.2.6.tar.gz

New:
----
virtualenv-clone-0.5.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-virtualenv-clone.spec ++++++
--- /var/tmp/diff_new_pack.FCE4MB/_old 2019-04-14 12:22:39.443778057 +0200
+++ /var/tmp/diff_new_pack.FCE4MB/_new 2019-04-14 12:22:39.447778061 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-virtualenv-clone
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -18,14 +18,17 @@

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-virtualenv-clone
-Version: 0.2.6
+Version: 0.5.3
Release: 0
Summary: Script to clone virtualenvs
License: MIT
Group: Development/Languages/Python
URL: http://github.com/edwardgeorge/virtualenv-clone
Source:
https://files.pythonhosted.org/packages/source/v/virtualenv-clone/virtualenv-clone-%{version}.tar.gz
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module tox}
+BuildRequires: %{python_module virtualenv}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
@@ -80,6 +83,9 @@
# setup up update-alternatives
%python_clone -a %{buildroot}%{_bindir}/virtualenv-clone

+%check
+%python_exec setup.py test
+
%post
%python_install_alternative virtualenv-clone

@@ -88,7 +94,7 @@

%files %{python_files}
%license LICENSE
-%doc README
+%doc README.md
%python_alternative %{_bindir}/virtualenv-clone
%{python_sitelib}/*


++++++ virtualenv-clone-0.2.6.tar.gz -> virtualenv-clone-0.5.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-clone-0.2.6/MANIFEST.in
new/virtualenv-clone-0.5.3/MANIFEST.in
--- old/virtualenv-clone-0.2.6/MANIFEST.in 2015-06-29 12:24:14.000000000
+0200
+++ new/virtualenv-clone-0.5.3/MANIFEST.in 2019-04-04 20:01:26.000000000
+0200
@@ -1,2 +1,2 @@
-include README
+include README.md
include LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-clone-0.2.6/PKG-INFO
new/virtualenv-clone-0.5.3/PKG-INFO
--- old/virtualenv-clone-0.2.6/PKG-INFO 2015-06-29 12:34:32.000000000 +0200
+++ new/virtualenv-clone-0.5.3/PKG-INFO 2019-04-08 23:24:53.000000000 +0200
@@ -1,17 +1,58 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: virtualenv-clone
-Version: 0.2.6
+Version: 0.5.3
Summary: script to clone virtualenvs.
-Home-page: http://github.com/edwardgeorge/virtualenv-clone
+Home-page: https://github.com/edwardgeorge/virtualenv-clone
Author: Edward George
Author-email: edwardgeorge@xxxxxxxxx
License: MIT
-Description: UNKNOWN
+Description: virtualenv cloning script.
+
+ [![Build
Status](https://travis-ci.org/edwardgeorge/virtualenv-clone.svg?branch=master)](https://travis-ci.org/edwardgeorge/virtualenv-clone)
+
+ A script for cloning a non-relocatable virtualenv.
+
+ Virtualenv provides a way to make virtualenv's relocatable which could
then be
+ copied as we wanted. However making a virtualenv relocatable this way
breaks
+ the no-site-packages isolation of the virtualenv as well as other
aspects that
+ come with relative paths and `/usr/bin/env` shebangs that may be
undesirable.
+
+ Also, the .pth and .egg-link rewriting doesn't seem to work as
intended. This
+ attempts to overcome these issues and provide a way to easily clone an
+ existing virtualenv.
+
+ It performs the following:
+
+ - copies `sys.argv[1]` dir to `sys.argv[2]`
+ - updates the hardcoded `VIRTUAL_ENV` variable in the activate script
to the
+ new repo location. (`--relocatable` doesn't touch this)
+ - updates the shebangs of the various scripts in bin to the new Python
if
+ they pointed to the old Python. (version numbering is retained.)
+
+ it can also change `/usr/bin/env python` shebangs to be absolute
too,
+ though this functionality is not exposed at present.
+
+ - checks `sys.path` of the cloned virtualenv and if any of the paths
are from
+ the old environment it finds any `.pth` or `.egg` link files within
sys.path
+ located in the new environment and makes sure any absolute paths to
the
+ old environment are updated to the new environment.
+
+ - finally it double checks `sys.path` again and will fail if there are
still
+ paths from the old environment present.
+
+ NOTE: This script requires Python 2.7 or 3.4+
+
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 3 - Alpha
-Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-clone-0.2.6/README
new/virtualenv-clone-0.5.3/README
--- old/virtualenv-clone-0.2.6/README 2015-06-29 12:24:14.000000000 +0200
+++ new/virtualenv-clone-0.5.3/README 1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-virtualenv cloning script.
-
-A script for cloning a non-relocatable virtualenv.
-
-Virtualenv provides a way to make virtualenv's relocatable which could then be
-copied as we wanted. However making a virtualenv relocatable this way breaks
-the no-site-packages isolation of the virtualenv as well as other aspects that
-come with relative paths and '/usr/bin/env' shebangs that may be undesirable.
-
-Also, the .pth and .egg-link rewriting doesn't seem to work as intended. This
-attempts to overcome these issues and provide a way to easily clone an
-existing virtualenv.
-
-It performs the following:
-
-- copies sys.argv[1] dir to sys.argv[2]
-- updates the hardcoded VIRTUAL_ENV variable in the activate script to the
- new repo location. (--relocatable doesn't touch this)
-- updates the shebangs of the various scripts in bin to the new python if
- they pointed to the old python. (version numbering is retained.)
-
- it can also change '/usr/bin/env python' shebangs to be absolute too,
- though this functionality is not exposed at present.
-
-- checks sys.path of the cloned virtualenv and if any of the paths are from
- the old environment it finds any .pth or .egg-link files within sys.path
- located in the new environment and makes sure any absolute paths to the
- old environment are updated to the new environment.
-
-- finally it double checks sys.path again and will fail if there are still
- paths from the old environment present.
-
-NOTE: This script requires Python >= 2.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-clone-0.2.6/README.md
new/virtualenv-clone-0.5.3/README.md
--- old/virtualenv-clone-0.2.6/README.md 1970-01-01 01:00:00.000000000
+0100
+++ new/virtualenv-clone-0.5.3/README.md 2019-01-17 01:37:33.000000000
+0100
@@ -0,0 +1,35 @@
+virtualenv cloning script.
+
+[![Build
Status](https://travis-ci.org/edwardgeorge/virtualenv-clone.svg?branch=master)](https://travis-ci.org/edwardgeorge/virtualenv-clone)
+
+A script for cloning a non-relocatable virtualenv.
+
+Virtualenv provides a way to make virtualenv's relocatable which could then be
+copied as we wanted. However making a virtualenv relocatable this way breaks
+the no-site-packages isolation of the virtualenv as well as other aspects that
+come with relative paths and `/usr/bin/env` shebangs that may be undesirable.
+
+Also, the .pth and .egg-link rewriting doesn't seem to work as intended. This
+attempts to overcome these issues and provide a way to easily clone an
+existing virtualenv.
+
+It performs the following:
+
+- copies `sys.argv[1]` dir to `sys.argv[2]`
+- updates the hardcoded `VIRTUAL_ENV` variable in the activate script to the
+ new repo location. (`--relocatable` doesn't touch this)
+- updates the shebangs of the various scripts in bin to the new Python if
+ they pointed to the old Python. (version numbering is retained.)
+
+ it can also change `/usr/bin/env python` shebangs to be absolute too,
+ though this functionality is not exposed at present.
+
+- checks `sys.path` of the cloned virtualenv and if any of the paths are from
+ the old environment it finds any `.pth` or `.egg` link files within sys.path
+ located in the new environment and makes sure any absolute paths to the
+ old environment are updated to the new environment.
+
+- finally it double checks `sys.path` again and will fail if there are still
+ paths from the old environment present.
+
+NOTE: This script requires Python 2.7 or 3.4+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-clone-0.2.6/clonevirtualenv.py
new/virtualenv-clone-0.5.3/clonevirtualenv.py
--- old/virtualenv-clone-0.2.6/clonevirtualenv.py 2015-06-29
12:30:34.000000000 +0200
+++ new/virtualenv-clone-0.5.3/clonevirtualenv.py 2019-04-08
23:23:24.000000000 +0200
@@ -1,5 +1,6 @@
#!/usr/bin/env python
from __future__ import with_statement
+
import logging
import optparse
import os
@@ -10,17 +11,12 @@
import sys
import itertools

-version_info = (0, 2, 6)
-__version__ = '.'.join(map(str, version_info))
+__version__ = '0.5.3'


logger = logging.getLogger()


-if sys.version_info < (2, 6):
- next = lambda gen: gen.next()
-
-
env_bin_dir = 'bin'
if sys.platform == 'win32':
env_bin_dir = 'Scripts'
@@ -65,7 +61,7 @@
stdout, err = p.communicate()
assert not p.returncode and stdout
lines = stdout.decode('utf-8').splitlines()
- return lines[0], filter(bool, lines[1:])
+ return lines[0], list(filter(bool, lines[1:]))


def clone_virtualenv(src_dir, dst_dir):
@@ -108,7 +104,7 @@
target = os.path.realpath(full_file_path)
if target.startswith(src_dir):
new_target = target.replace(src_dir, dst_dir)
- logger.debug('fixing symlink in {}'.format(full_file_path))
+ logger.debug('fixing symlink in %s' % (full_file_path,))
os.remove(full_file_path)
os.symlink(new_target, full_file_path)

@@ -116,7 +112,7 @@
def fixup_scripts(old_dir, new_dir, version, rewrite_env_python=False):
bin_dir = os.path.join(new_dir, env_bin_dir)
root, dirs, files = next(os.walk(bin_dir))
- pybinre = re.compile('pythonw?([0-9]+(\.[0-9]+(\.[0-9]+)?)?)?$')
+ pybinre = re.compile(r'pythonw?([0-9]+(\.[0-9]+(\.[0-9]+)?)?)?$')
for file_ in files:
filename = os.path.join(root, file_)
if file_ in ['python', 'python%s' % version, 'activate_this.py']:
@@ -170,6 +166,11 @@
# binary file
return

+ # This takes care of the scheme in which shebang is of type
+ # '#!/venv/bin/python3' while the version of system python
+ # is of type 3.x e.g. 3.5.
+ short_version = bang[len(old_shebang):]
+
if not bang.startswith('#!'):
return
elif bang == old_shebang:
@@ -177,6 +178,10 @@
elif (bang.startswith(old_shebang)
and bang[len(old_shebang):] == version):
rewrite_shebang(version)
+ elif (bang.startswith(old_shebang)
+ and short_version
+ and bang[len(old_shebang):] == short_version):
+ rewrite_shebang(short_version)
elif rewrite_env_python and bang.startswith(env_shebang):
if bang == env_shebang:
rewrite_shebang()
@@ -250,20 +255,26 @@


def fixup_pth_file(filename, old_dir, new_dir):
- logger.debug('fixing %s' % filename)
- with open(filename, 'rb') as f:
+ logger.debug('fixup_pth_file %s' % filename)
+
+ with open(filename, 'r') as f:
lines = f.readlines()
+
has_change = False
+
for num, line in enumerate(lines):
- line = line.decode('utf-8').strip()
+ line = (line.decode('utf-8') if hasattr(line, 'decode') else
line).strip()
+
if not line or line.startswith('#') or line.startswith('import '):
continue
elif _dirmatch(line, old_dir):
lines[num] = line.replace(old_dir, new_dir, 1)
has_change = True
+
if has_change:
- with open(filename, 'wb') as f:
- f.writelines(lines)
+ with open(filename, 'w') as f:
+ payload = os.linesep.join([l.strip() for l in lines]) + os.linesep
+ f.write(payload)


def fixup_egglink_file(filename, old_dir, new_dir):
@@ -289,10 +300,10 @@
try:
old_dir, new_dir = args
except ValueError:
- print("virtualenv-clone {}".format(__version__))
+ print("virtualenv-clone %s" % (__version__,))
parser.error("not enough arguments given.")
- old_dir = os.path.normpath(os.path.abspath(old_dir))
- new_dir = os.path.normpath(os.path.abspath(new_dir))
+ old_dir = os.path.realpath(old_dir)
+ new_dir = os.path.realpath(new_dir)
loglevel = (logging.WARNING, logging.INFO, logging.DEBUG)[min(2,
options.verbose)]
logging.basicConfig(level=loglevel, format='%(message)s')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-clone-0.2.6/setup.cfg
new/virtualenv-clone-0.5.3/setup.cfg
--- old/virtualenv-clone-0.2.6/setup.cfg 2015-06-29 12:34:32.000000000
+0200
+++ new/virtualenv-clone-0.5.3/setup.cfg 2019-04-08 23:24:53.000000000
+0200
@@ -1,5 +1,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-clone-0.2.6/setup.py
new/virtualenv-clone-0.5.3/setup.py
--- old/virtualenv-clone-0.2.6/setup.py 2015-06-29 12:34:06.000000000 +0200
+++ new/virtualenv-clone-0.5.3/setup.py 2019-04-08 23:23:33.000000000 +0200
@@ -3,8 +3,12 @@
from setuptools import setup


-if __name__ == '__main__' and sys.version_info < (2, 5):
- raise SystemExit("Python >= 2.5 required for virtualenv-clone")
+if __name__ == '__main__' and sys.version_info < (2, 7):
+ raise SystemExit("Python >= 2.7 required for virtualenv-clone")
+
+with open('README.md') as f:
+ long_description = f.read()
+

test_requirements = [
'virtualenv',
@@ -25,25 +29,32 @@


setup(name="virtualenv-clone",
- version='0.2.6',
+ version='0.5.3',
description='script to clone virtualenvs.',
+ long_description=long_description,
+ long_description_content_type='text/markdown',
author='Edward George',
author_email='edwardgeorge@xxxxxxxxx',
- url='http://github.com/edwardgeorge/virtualenv-clone',
+ url='https://github.com/edwardgeorge/virtualenv-clone',
license="MIT",
py_modules=["clonevirtualenv"],
entry_points={
'console_scripts': [
'virtualenv-clone=clonevirtualenv:main',
]},
- classifiers=[
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
+ classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Intended Audience :: Developers",
"Development Status :: 3 - Alpha",
- "Programming Language :: Python :: 2.6",
+ "Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
- "Programming Language :: Python :: 3.2",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.4",
+ "Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
],
tests_require=test_requirements,
cmdclass={'test': ToxTest}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/virtualenv-clone-0.2.6/virtualenv_clone.egg-info/PKG-INFO
new/virtualenv-clone-0.5.3/virtualenv_clone.egg-info/PKG-INFO
--- old/virtualenv-clone-0.2.6/virtualenv_clone.egg-info/PKG-INFO
2015-06-29 12:34:32.000000000 +0200
+++ new/virtualenv-clone-0.5.3/virtualenv_clone.egg-info/PKG-INFO
2019-04-08 23:24:52.000000000 +0200
@@ -1,17 +1,58 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: virtualenv-clone
-Version: 0.2.6
+Version: 0.5.3
Summary: script to clone virtualenvs.
-Home-page: http://github.com/edwardgeorge/virtualenv-clone
+Home-page: https://github.com/edwardgeorge/virtualenv-clone
Author: Edward George
Author-email: edwardgeorge@xxxxxxxxx
License: MIT
-Description: UNKNOWN
+Description: virtualenv cloning script.
+
+ [![Build
Status](https://travis-ci.org/edwardgeorge/virtualenv-clone.svg?branch=master)](https://travis-ci.org/edwardgeorge/virtualenv-clone)
+
+ A script for cloning a non-relocatable virtualenv.
+
+ Virtualenv provides a way to make virtualenv's relocatable which could
then be
+ copied as we wanted. However making a virtualenv relocatable this way
breaks
+ the no-site-packages isolation of the virtualenv as well as other
aspects that
+ come with relative paths and `/usr/bin/env` shebangs that may be
undesirable.
+
+ Also, the .pth and .egg-link rewriting doesn't seem to work as
intended. This
+ attempts to overcome these issues and provide a way to easily clone an
+ existing virtualenv.
+
+ It performs the following:
+
+ - copies `sys.argv[1]` dir to `sys.argv[2]`
+ - updates the hardcoded `VIRTUAL_ENV` variable in the activate script
to the
+ new repo location. (`--relocatable` doesn't touch this)
+ - updates the shebangs of the various scripts in bin to the new Python
if
+ they pointed to the old Python. (version numbering is retained.)
+
+ it can also change `/usr/bin/env python` shebangs to be absolute
too,
+ though this functionality is not exposed at present.
+
+ - checks `sys.path` of the cloned virtualenv and if any of the paths
are from
+ the old environment it finds any `.pth` or `.egg` link files within
sys.path
+ located in the new environment and makes sure any absolute paths to
the
+ old environment are updated to the new environment.
+
+ - finally it double checks `sys.path` again and will fail if there are
still
+ paths from the old environment present.
+
+ NOTE: This script requires Python 2.7 or 3.4+
+
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 3 - Alpha
-Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/virtualenv-clone-0.2.6/virtualenv_clone.egg-info/SOURCES.txt
new/virtualenv-clone-0.5.3/virtualenv_clone.egg-info/SOURCES.txt
--- old/virtualenv-clone-0.2.6/virtualenv_clone.egg-info/SOURCES.txt
2015-06-29 12:34:32.000000000 +0200
+++ new/virtualenv-clone-0.5.3/virtualenv_clone.egg-info/SOURCES.txt
2019-04-08 23:24:52.000000000 +0200
@@ -1,6 +1,6 @@
LICENSE
MANIFEST.in
-README
+README.md
clonevirtualenv.py
setup.py
virtualenv_clone.egg-info/PKG-INFO


< Previous Next >
This Thread
  • No further messages