Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-nodeenv for openSUSE:Factory 
checked in at 2021-06-19 23:03:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nodeenv (Old)
 and      /work/SRC/openSUSE:Factory/.python-nodeenv.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-nodeenv"

Sat Jun 19 23:03:06 2021 rev:6 rq:900660 version:1.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nodeenv/python-nodeenv.changes    
2020-09-16 19:42:37.987016750 +0200
+++ /work/SRC/openSUSE:Factory/.python-nodeenv.new.2625/python-nodeenv.changes  
2021-06-19 23:03:37.431725302 +0200
@@ -1,0 +2,6 @@
+Thu Jun 17 21:09:12 UTC 2021 - Dirk M??ller <dmuel...@suse.com>
+
+- update to 1.6.0:
+  * M1 support 
+
+-------------------------------------------------------------------

Old:
----
  nodeenv-1.5.0.tar.gz

New:
----
  nodeenv-1.6.0.tar.gz

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

Other differences:
------------------
++++++ python-nodeenv.spec ++++++
--- /var/tmp/diff_new_pack.1GcYTY/_old  2021-06-19 23:03:37.883725999 +0200
+++ /var/tmp/diff_new_pack.1GcYTY/_new  2021-06-19 23:03:37.887726005 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-nodeenv
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 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.5.0
+Version:        1.6.0
 Release:        0
 Summary:        Nodejs virtual environment builder
 License:        BSD-2-Clause
@@ -31,7 +31,7 @@
 BuildRequires:  python-rpm-macros
 Requires:       python-setuptools
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
 BuildArch:      noarch
 %python_subpackages
 

++++++ nodeenv-1.5.0.tar.gz -> nodeenv-1.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nodeenv-1.5.0/nodeenv.py new/nodeenv-1.6.0/nodeenv.py
--- old/nodeenv-1.5.0/nodeenv.py        2020-08-23 20:26:37.000000000 +0200
+++ new/nodeenv-1.6.0/nodeenv.py        2021-04-09 10:10:31.000000000 +0200
@@ -47,7 +47,7 @@
 
 from pkg_resources import parse_version
 
-nodeenv_version = '1.5.0'
+nodeenv_version = '1.6.0'
 
 join = os.path.join
 abspath = os.path.abspath
@@ -226,6 +226,7 @@
         '--node=0.4.3 will use the node-v0.4.3 '
         'to create the new environment. '
         'The default is last stable version (`latest`). '
+        'Use `lts` to use the latest LTS release. '
         'Use `system` to use system-wide node.')
 
     parser.add_option(
@@ -524,6 +525,10 @@
         'armv7l': 'armv7l',
         'armv8l': 'armv7l',
         'aarch64': 'arm64',
+        'arm64': 'arm64',
+        'arm64/v8': 'arm64',
+        'armv8': 'arm64',
+        'armv8.4': 'arm64',
         'ppc64le': 'ppc64le',   # Power PC
         's390x': 's390x',       # IBM S390x
     }
@@ -997,6 +1002,13 @@
     return _get_versions_json()[0]['version'].lstrip('v')
 
 
+def get_last_lts_node_version():
+    """
+    Return the last node.js version marked as LTS
+    """
+    return next((v['version'].lstrip('v') for v in _get_versions_json() if 
v['lts']), None)
+
+
 def get_env_dir(opt, args):
     if opt.python_virtualenv:
         if hasattr(sys, 'real_prefix'):
@@ -1052,8 +1064,10 @@
     if src_base_url is None:
         src_base_url = 'https://%s/download/release' % src_domain
 
-    if not opt.node or opt.node.lower() == "latest":
+    if not opt.node or opt.node.lower() == 'latest':
         opt.node = get_last_stable_node_version()
+    elif opt.node.lower() == 'lts':
+        opt.node = get_last_lts_node_version()
 
     if opt.list:
         print_node_versions()
@@ -1401,8 +1415,17 @@
 # unset irrelevant variables
 deactivate_node nondestructive
 
-# NODE_VIRTUAL_ENV is the parent of the directory where this script is
-set -gx NODE_VIRTUAL_ENV __NODE_VIRTUAL_ENV__
+# find the directory of this script
+begin
+    set -l SOURCE (status filename)
+    while test -L "$SOURCE"
+        set SOURCE (readlink "$SOURCE")
+    end
+    set -l DIR (dirname (realpath "$SOURCE"))
+
+    # NODE_VIRTUAL_ENV is the parent of the directory where this script is
+    set -gx NODE_VIRTUAL_ENV (dirname "$DIR")
+end
 
 set -gx _OLD_NODE_VIRTUAL_PATH $PATH
 # The node_modules/.bin path doesn't exists and it will print a warning, and
@@ -1436,8 +1459,8 @@
 
         # Prompt override provided?
         # If not, just prepend the environment name.
-        if test -n ""
-            printf '%s%s' "" (set_color normal)
+        if test -n "__NODE_VIRTUAL_PROMPT__"
+            printf '%s%s ' "__NODE_VIRTUAL_PROMPT__" (set_color normal)
         else
             printf '%s(%s) ' (set_color normal) (basename "$NODE_VIRTUAL_ENV")
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nodeenv-1.5.0/tests/nodeenv_test.py 
new/nodeenv-1.6.0/tests/nodeenv_test.py
--- old/nodeenv-1.5.0/tests/nodeenv_test.py     2020-08-23 20:26:37.000000000 
+0200
+++ new/nodeenv-1.6.0/tests/nodeenv_test.py     2021-04-09 10:10:31.000000000 
+0200
@@ -5,6 +5,7 @@
 import pipes
 import subprocess
 import sys
+import sysconfig
 
 import mock
 import pytest
@@ -26,7 +27,7 @@
     assert os.path.exists(nenv_path)
     activate = pipes.quote(os.path.join(nenv_path, 'bin', 'activate'))
     subprocess.check_call([
-        'sh', '-c', '. {} && nodejs --version'.format(activate),
+        'sh', '-c', '. {} && node --version'.format(activate),
     ])
 
 
@@ -41,7 +42,7 @@
     assert os.path.exists(nenv_path)
     activate = pipes.quote(os.path.join(nenv_path, 'bin', 'activate'))
     subprocess.check_call([
-        'sh', '-c', '. {} && nodejs --version'.format(activate),
+        'sh', '-c', '. {} && node --version'.format(activate),
     ])
 
 
@@ -82,7 +83,7 @@
     assert printed.endswith('\n13.1.0\t13.2.0\t13.3.0\t13.4.0\t13.5.0')
     tabs_per_line = [line.count('\t') for line in printed.splitlines()]
     # 8 items per line = 7 tabs
-    # The last line contains the remaning 5 items
+    # The last line contains the remaining 5 items
     assert tabs_per_line == [7] * 60 + [4]
 
 
@@ -106,6 +107,11 @@
              'https://npm.some-mirror.com/download/release/index.json'),
             ('',
              'https://nodejs.org/download/release/index.json')]
+    sys_type = sysconfig.get_config_var('HOST_GNU_TYPE')
+    musl_type = ['x86_64-pc-linux-musl', 'x86_64-unknown-linux-musl']
+    # Check if running on musl system and delete last mirror if it is
+    if sys_type in musl_type:
+        urls.pop()
     with open(os.path.join(HERE, 'nodejs_index.json'), 'rb') as f:
         def rewind(_):
             f.seek(0)
@@ -124,3 +130,13 @@
                 nodeenv.main()
                 mock_urlopen.assert_called_with(url)
                 mock_logger.assert_called()
+
+
+@pytest.mark.usefixtures('mock_index_json')
+def test_get_latest_node_version():
+    assert nodeenv.get_last_stable_node_version() == '13.5.0'
+
+
+@pytest.mark.usefixtures('mock_index_json')
+def test_get_lts_node_version():
+    assert nodeenv.get_last_lts_node_version() == '12.14.0'

Reply via email to