Hello community, here is the log from the commit of package python-nodeenv for openSUSE:Factory checked in at 2020-03-18 12:29:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-nodeenv (Old) and /work/SRC/openSUSE:Factory/.python-nodeenv.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-nodeenv" Wed Mar 18 12:29:50 2020 rev:2 rq:785590 version:1.3.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python-nodeenv/python-nodeenv.changes 2019-10-31 18:14:46.613980740 +0100 +++ /work/SRC/openSUSE:Factory/.python-nodeenv.new.3160/python-nodeenv.changes 2020-03-18 12:40:47.664780178 +0100 @@ -1,0 +2,5 @@ +Mon Mar 16 10:52:58 UTC 2020 - Dirk Mueller <dmuel...@suse.com> + +- update to 1.3.5 + +------------------------------------------------------------------- Old: ---- nodeenv-1.3.3.tar.gz New: ---- nodeenv-1.3.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-nodeenv.spec ++++++ --- /var/tmp/diff_new_pack.dGv02t/_old 2020-03-18 12:40:48.528780725 +0100 +++ /var/tmp/diff_new_pack.dGv02t/_new 2020-03-18 12:40:48.548780738 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-nodeenv # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-nodeenv -Version: 1.3.3 +Version: 1.3.5 Release: 0 Summary: Nodejs virtual environment builder License: BSD-2-Clause ++++++ nodeenv-1.3.3.tar.gz -> nodeenv-1.3.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nodeenv-1.3.3/.coveragerc new/nodeenv-1.3.5/.coveragerc --- old/nodeenv-1.3.3/.coveragerc 2018-11-06 13:58:49.000000000 +0100 +++ new/nodeenv-1.3.5/.coveragerc 2020-02-04 09:12:51.000000000 +0100 @@ -5,7 +5,6 @@ omit = .tox/* /usr/* - */tmp* setup.py # Don't complain if non-runnable code isn't run */__main__.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nodeenv-1.3.3/AUTHORS new/nodeenv-1.3.5/AUTHORS --- old/nodeenv-1.3.3/AUTHORS 2018-11-06 13:58:49.000000000 +0100 +++ new/nodeenv-1.3.5/AUTHORS 2020-02-04 09:12:51.000000000 +0100 @@ -13,9 +13,9 @@ - Pierre Le Marre - Doug Turnbull - Anton Parkhomenko -- syndbg - Vyacheslav Levit - Travis Miller +- syndbg - Spencer Rathbun - Luis Orduz - Lucas Cimon @@ -28,39 +28,45 @@ - Andrzej Pragacz - Alex Couper - 0Xellos -- urbandove -- michael -- jiho -- dkgitdev -- dhilipsiva -- cmehay - Zenobius Jiricek - Yi-Feng Tzeng - Willem Jan Withagen +- Walter dos Santos Filho - VladimĂr Gorej - Vincent Bernat +- urbandove - Uman Shahzad - Terseus - Stan Seibert - Shubhang Mani +- sam - Rik +- rachmadaniHaryono - Philipp Dieter - Mrinal Wadhwa - Michal Kolodziejski +- michael - Max Liebkies - Marc-Antoine Parent - Marc Abramowitz - Laust Rud Jacobsen - Ken Struys - Kai Weber +- Josh Soref +- Joby Harding +- jiho - Jesse Dhillon - Jeremy Banks - Geoffrey Huntley - Fabricio C Zuardi +- dkgitdev +- dhilipsiva - Dennis Flanigan - Dan North - Dan Fuchs - Damien Nozay +- cmehay - Brian Jacobel - Ben Davis +- Andreas Wirooks - Alexey Poryadin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nodeenv-1.3.3/CHANGES new/nodeenv-1.3.5/CHANGES --- old/nodeenv-1.3.3/CHANGES 2018-11-06 13:58:49.000000000 +0100 +++ new/nodeenv-1.3.5/CHANGES 2020-02-04 09:12:51.000000000 +0100 @@ -3,47 +3,47 @@ Version 1.3.1 ------------- -- Windows related fix `#207 https://github.com/ekalinin/nodeenv/pull/207` -- Fixed url for arm64 `#210 https://github.com/ekalinin/nodeenv/pull/210`_ -- Fixed fish support `#212 https://github.com/ekalinin/nodeenv/pull/212`_ +- Windows related fix `#207 <https://github.com/ekalinin/nodeenv/pull/207>`_ +- Fixed url for arm64 `#210 <https://github.com/ekalinin/nodeenv/pull/210>`_ +- Fixed fish support `#212 <https://github.com/ekalinin/nodeenv/pull/212>`_ Version 1.3.0 ------------- -- Fixed symlink creation `#189 https://github.com/ekalinin/nodeenv/issues/189`_ -- Python3.6 support `#200 https://github.com/ekalinin/nodeenv/pull/200`_ -- Added `activate` for fish `#201 https://github.com/ekalinin/nodeenv/pull/201`_ -- Fixed cp866 `#202 https://github.com/ekalinin/nodeenv/pull/202`_ -- Added Conda support `#203 https://github.com/ekalinin/nodeenv/pull/203`_ +- Fixed symlink creation `#189 <https://github.com/ekalinin/nodeenv/issues/189>`_ +- Python3.6 support `#200 <https://github.com/ekalinin/nodeenv/pull/200>`_ +- Added `activate` for fish `#201 <https://github.com/ekalinin/nodeenv/pull/201>`_ +- Fixed cp866 `#202 <https://github.com/ekalinin/nodeenv/pull/202>`_ +- Added Conda support `#203 <https://github.com/ekalinin/nodeenv/pull/203>`_ Version 1.2.0 ------------- -- Support for Cygwin `#194 https://github.com/ekalinin/nodeenv/pull/194`_ `#195 - https://github.com/ekalinin/nodeenv/pull/195`_ +- Support for Cygwin `#194 <https://github.com/ekalinin/nodeenv/pull/194>`_ `#195 + <https://github.com/ekalinin/nodeenv/pull/195>`_ - tox.ini as default configuration file `#197 - https://github.com/ekalinin/nodeenv/pull/197`_ + <https://github.com/ekalinin/nodeenv/pull/197>`_ Version 1.1.4 ------------- -- Fixed directory copy `#188 https://github.com/ekalinin/nodeenv/issues/188`_ +- Fixed directory copy `#188 <https://github.com/ekalinin/nodeenv/issues/188>`_ Version 1.1.3 ------------- -- Fixed spaces in paths `#187 https://github.com/ekalinin/nodeenv/issues/187`_ +- Fixed spaces in paths `#187 <https://github.com/ekalinin/nodeenv/issues/187>`_ Version 1.1.2 ------------- -- Fixed MANIFEST.in `#184 https://github.com/ekalinin/nodeenv/issues/184`_ +- Fixed MANIFEST.in `#184 <https://github.com/ekalinin/nodeenv/issues/184>`_ Version 1.1.1 ------------- - Improve Windows support. See `#181 - https://github.com/ekalinin/nodeenv/pull/181`_ + <https://github.com/ekalinin/nodeenv/pull/181>`_ - Fix bug when downgrading using `--force`. See `#183 - https://github.com/ekalinin/nodeenv/pull/183`_ + <https://github.com/ekalinin/nodeenv/pull/183>`_ - Environment creation fails with non-ASCII chars in path. See `#49 - https://github.com/ekalinin/nodeenv/issues/49`_ + <https://github.com/ekalinin/nodeenv/issues/49>`_ Version 1.1.0 ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nodeenv-1.3.3/Makefile new/nodeenv-1.3.5/Makefile --- old/nodeenv-1.3.3/Makefile 2018-11-06 13:58:49.000000000 +0100 +++ new/nodeenv-1.3.5/Makefile 2020-02-04 09:12:51.000000000 +0100 @@ -8,7 +8,8 @@ git push --tags origin master deploy-pypi: - python setup.py sdist upload -r pypi + python setup.py sdist bdist_wheel + twine upload --repository pypi dist/* update-pypi: python setup.py register diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nodeenv-1.3.3/nodeenv.py new/nodeenv-1.3.5/nodeenv.py --- old/nodeenv-1.3.3/nodeenv.py 2018-11-06 13:58:49.000000000 +0100 +++ new/nodeenv-1.3.5/nodeenv.py 2020-02-04 09:12:51.000000000 +0100 @@ -42,13 +42,14 @@ from pkg_resources import parse_version -nodeenv_version = '1.3.3' +nodeenv_version = '1.3.5' join = os.path.join abspath = os.path.abspath +iojs_taken = False src_domain = "nodejs.org" -is_PY3 = sys.version_info[0] == 3 +is_PY3 = sys.version_info[0] >= 3 if is_PY3: from functools import cmp_to_key @@ -66,20 +67,19 @@ if not text or is_PY3: return text - try: # unicode or pure ascii + try: # unicode or pure ascii return text.encode("utf8") except UnicodeDecodeError: - try: # successful UTF-8 decode means it's pretty sure UTF-8 + try: # successful UTF-8 decode means it's pretty sure UTF-8 text.decode("utf8") return text except UnicodeDecodeError: - try: # get desperate; and yes, - # this has a western hemisphere bias + try: # get desperate; and yes, this has a western hemisphere bias return text.decode("cp1252").encode("utf8") except UnicodeDecodeError: pass - return text # return unchanged, hope for the best + return text # return unchanged, hope for the best class Config(object): @@ -90,7 +90,7 @@ # Defaults node = 'latest' npm = 'latest' - with_npm = True if is_WIN or is_CYGWIN else False + with_npm = False jobs = '2' without_ssl = False debug = False @@ -230,6 +230,11 @@ action='store_true', dest='io', default=False, help='Use iojs instead of nodejs.') + parser.add_option( + '--mirror', + action="store", dest='mirror', + help='Set mirror server of nodejs.org or iojs.org to download from.') + if not is_WIN: parser.add_option( '-j', '--jobs', dest='jobs', default=Config.jobs, @@ -380,13 +385,17 @@ logger.debug(' * Directory %s already exists', path) +def make_executable(filename): + mode_0755 = (stat.S_IRWXU | stat.S_IXGRP | + stat.S_IRGRP | stat.S_IROTH | stat.S_IXOTH) + os.chmod(filename, mode_0755) + + # noinspection PyArgumentList def writefile(dest, content, overwrite=True, append=False): """ Create file and write content in it """ - mode_0755 = (stat.S_IRWXU | stat.S_IXGRP | - stat.S_IRGRP | stat.S_IROTH | stat.S_IXOTH) content = to_utf8(content) if is_PY3 and type(content) != bytes: content = bytes(content, 'utf-8') @@ -394,7 +403,7 @@ logger.debug(' * Writing %s ... ', dest, extra=dict(continued=True)) with open(dest, 'wb') as f: f.write(content) - os.chmod(dest, mode_0755) + make_executable(dest) logger.debug('done.') return else: @@ -512,7 +521,8 @@ 'arch': archmap[platform.machine()], } if is_WIN or is_CYGWIN: - filename = 'win-%(arch)s/node.exe' % sysinfo + postfix = '-win-%(arch)s.zip' % sysinfo + filename = '%s-v%s%s' % (get_binary_prefix(), version, postfix) else: postfix = '-%(system)s-%(arch)s.tar.gz' % sysinfo filename = '%s-v%s%s' % (get_binary_prefix(), version, postfix) @@ -543,18 +553,24 @@ logger.info('.', extra=dict(continued=True)) if is_WIN or is_CYGWIN: - writefile(join(src_dir, 'node.exe'), dl_contents.read()) + ctx = zipfile.ZipFile(dl_contents) + members = operator.methodcaller('namelist') + member_name = lambda s: s # noqa: E731 else: - with tarfile_open(fileobj=dl_contents) as tarfile_obj: - member_list = tarfile_obj.getmembers() - extract_list = [] - for member in member_list: - node_ver = opt.node.replace('.', '\.') - rexp_string = "%s-v%s[^/]*/(README\.md|CHANGELOG\.md|LICENSE)"\ - % (prefix, node_ver) - if re.match(rexp_string, member.name) is None: - extract_list.append(member) - tarfile_obj.extractall(src_dir, extract_list) + ctx = tarfile_open(fileobj=dl_contents) + members = operator.methodcaller('getmembers') + member_name = operator.attrgetter('name') + + with ctx as archive: + node_ver = re.escape(opt.node) + rexp_string = r"%s-v%s[^/]*/(README\.md|CHANGELOG\.md|LICENSE)"\ + % (prefix, node_ver) + extract_list = [ + member + for member in members(archive) + if re.match(rexp_string, member_name(member)) is None + ] + archive.extractall(src_dir, extract_list) def urlopen(url): @@ -592,20 +608,26 @@ logger.info('.', extra=dict(continued=True)) prefix = get_binary_prefix() if is_WIN: - src_exe = join(src_dir, 'node.exe') - dst_exe = join(env_dir, 'Scripts', 'node.exe') - mkdir(join(env_dir, 'Scripts')) - callit(['copy', '/Y', '/L', src_exe, dst_exe], False, True) + dest = join(env_dir, 'Scripts') + mkdir(dest) elif is_CYGWIN: - mkdir(join(env_dir, 'bin')) + dest = join(env_dir, 'bin') + mkdir(dest) + # write here to avoid https://bugs.python.org/issue35650 writefile(join(env_dir, 'bin', 'node'), CYGWIN_NODE) - src_exe = join(src_dir, 'node.exe') - dst_exe = join(env_dir, 'bin', 'node.exe') - callit(['cp', '-a', src_exe, dst_exe], True, env_dir) else: - src_folder_tpl = src_dir + to_utf8('/%s-v%s*' % (prefix, node_version)) - for src_folder in glob.glob(src_folder_tpl): - copytree(src_folder, env_dir, True) + dest = env_dir + + src_folder_tpl = src_dir + to_utf8('/%s-v%s*' % (prefix, node_version)) + src_folder, = glob.glob(src_folder_tpl) + copytree(src_folder, dest, True) + + if is_CYGWIN: + for filename in ('npm', 'npx', 'node.exe'): + filename = join(env_dir, 'bin', filename) + if os.path.exists(filename): + make_executable(filename) + logger.info('.', extra=dict(continued=True)) @@ -666,7 +688,7 @@ def get_binary_prefix(): - return to_utf8('node' if src_domain == 'nodejs.org' else 'iojs') + return to_utf8('node' if not iojs_taken else 'iojs') def install_node(env_dir, src_dir, opt): @@ -674,6 +696,15 @@ Download source code for node.js, unpack it and install it in virtual environment. """ + try: + install_node_wrapped(env_dir, src_dir, opt) + except BaseException: + # this restores the newline suppressed by continued=True + logger.info('') + raise + + +def install_node_wrapped(env_dir, src_dir, opt): env_dir = abspath(env_dir) prefix = get_binary_prefix() node_src_dir = join(src_dir, to_utf8('%s-v%s' % (prefix, opt.node))) @@ -739,7 +770,7 @@ """ logger.info(' * Install npm.js (%s) ... ' % opt.npm, extra=dict(continued=True)) - npm_url = 'https://github.com/npm/cli/archive/%s.zip' % opt.npm + npm_url = 'https://github.com/npm/cli/archive/v%s.zip' % opt.npm npm_contents = io.BytesIO(urlopen(npm_url).read()) bin_path = join(env_dir, 'Scripts') @@ -769,7 +800,7 @@ join(env_dir, 'bin', 'npm-cli.js')) shutil.copytree(join(bin_path, 'node_modules'), join(env_dir, 'bin', 'node_modules')) - npm_gh_url = 'https://raw.githubusercontent.com/npm/npm' + npm_gh_url = 'https://raw.githubusercontent.com/npm/cli' npm_bin_url = '{}/{}/bin/npm'.format(npm_gh_url, opt.npm) writefile(join(env_dir, 'bin', 'npm'), urlopen(npm_bin_url).read()) @@ -934,7 +965,7 @@ self.hrefs.append(dict(attrs).get('href', '')) -VERSION_RE = re.compile('\d+\.\d+\.\d+') +VERSION_RE = re.compile(r'\d+\.\d+\.\d+') def _py2_cmp(a, b): @@ -1059,10 +1090,16 @@ logger.error('Installing system node.js on win32 is not supported!') exit(1) + global iojs_taken + global src_domain + if opt.io: - global src_domain + iojs_taken = True src_domain = "iojs.org" + if opt.mirror: + src_domain = opt.mirror + if not opt.node or opt.node.lower() == "latest": opt.node = get_last_stable_node_version() @@ -1110,7 +1147,7 @@ exec __SHIM_NODE__ "$@" """ -ACTIVATE_BAT = """\ +ACTIVATE_BAT = r""" @echo off set "NODE_VIRTUAL_ENV=__NODE_VIRTUAL_ENV__" if not defined PROMPT ( @@ -1156,7 +1193,7 @@ :END """ -ACTIVATE_PS1 = """\ +ACTIVATE_PS1 = r""" function global:deactivate ([switch]$NonDestructive) { # Revert to original values if (Test-Path function:_OLD_VIRTUAL_PROMPT) { @@ -1203,7 +1240,7 @@ $env:PATH = "$env:NODE_VIRTUAL_ENV\Scripts;$env:PATH" """ -ACTIVATE_SH = """ +ACTIVATE_SH = r""" # This file must be used with "source bin/activate" *from bash* # you cannot run it directly @@ -1384,7 +1421,7 @@ function freeze -d 'Show a list of installed packages - like `pip freeze`' set -l NPM_VER (npm -v | cut -d '.' -f 1) - set -l RE "[a-zA-Z0-9\.\-]+@[0-9]+\.[0-9]+\.[0-9]+([\+\-][a-zA-Z0-9\.\-]+)*" + set -l RE "[a-zA-Z0-9\\.\\-]+@[0-9]+\\.[0-9]+\\.[0-9]+([\\+\\-][a-zA-Z0-9\\.\\-]+)*" if test "$NPM_VER" = "0" set -g NPM_LIST (npm list installed active >/dev/null ^/dev/null | \ @@ -1395,7 +1432,7 @@ set NPM_LS "npm ls" set -e argv[1] end - set -l NPM_LIST (eval $NPM_LS | grep -E '^.{4}\w{1}' | \ + set -l NPM_LIST (eval $NPM_LS | grep -E '^.{4}\\w{1}' | \ grep -o -E "$re" | \ grep -v npm) end @@ -1458,7 +1495,7 @@ set -gx _OLD_NODE_FISH_PROMPT_OVERRIDE "$NODE_VIRTUAL_ENV" end -""" # noqa +""" # noqa: E501 PREDEACTIVATE_SH = """ if type -p deactivate_node > /dev/null; then deactivate_node;fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nodeenv-1.3.3/setup.py new/nodeenv-1.3.5/setup.py --- old/nodeenv-1.3.3/setup.py 2018-11-06 13:58:49.000000000 +0100 +++ new/nodeenv-1.3.5/setup.py 2020-02-04 09:12:51.000000000 +0100 @@ -58,5 +58,6 @@ 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules' - ] + ], + options={'bdist_wheel': {'universal': True}}, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nodeenv-1.3.3/tox.ini new/nodeenv-1.3.5/tox.ini --- old/nodeenv-1.3.3/tox.ini 2018-11-06 13:58:49.000000000 +0100 +++ new/nodeenv-1.3.5/tox.ini 2020-02-04 09:12:51.000000000 +0100 @@ -13,7 +13,7 @@ # Needed because we subprocess to ourselves coverage combine coverage report --show-missing --fail-under 55 # TODO: 100 - flake8 --ignore=W605,W504,E241 nodeenv.py tests setup.py + flake8 nodeenv.py tests setup.py [testenv:venv] envdir = venv-nodeenv