Hello community,

here is the log from the commit of package python-rpm-macros for 
openSUSE:Factory checked in at 2020-01-23 16:08:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rpm-macros (Old)
 and      /work/SRC/openSUSE:Factory/.python-rpm-macros.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-rpm-macros"

Thu Jan 23 16:08:53 2020 rev:23 rq:766078 version:20200117.8e39013

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rpm-macros/python-rpm-macros.changes      
2019-11-08 15:21:45.862743339 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-rpm-macros.new.26092/python-rpm-macros.changes
   2020-01-23 16:10:07.487607777 +0100
@@ -1,0 +2,11 @@
+Mon Jan 20 18:35:19 UTC 2020 - Neal Gompa <[email protected]>
+
+- Add python-rpm-generators to express setuptools dependency for generator
+
+-------------------------------------------------------------------
+Fri Jan 17 13:09:29 UTC 2020 - Neal Gompa <[email protected]>
+
+- Update to version 20200117.8e39013:
+  * Add macros related to the Python dist metadata dependency generator
+
+-------------------------------------------------------------------

Old:
----
  python-rpm-macros-20191104.08e6493.tar.bz2

New:
----
  python-rpm-macros-20200117.8e39013.tar.bz2

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

Other differences:
------------------
++++++ python-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.i0UnEy/_old  2020-01-23 16:10:09.183608783 +0100
+++ /var/tmp/diff_new_pack.i0UnEy/_new  2020-01-23 16:10:09.183608783 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python-rpm-macros
-Version:        20191104.08e6493
+Version:        20200117.8e39013
 Release:        0
 Summary:        RPM macros for building of Python modules
 License:        WTFPL
@@ -27,6 +27,8 @@
 # Fedora compatibility
 Provides:       python2-rpm-macros
 Provides:       python3-rpm-macros
+# To keep user expectations reasonably sane
+Recommends:     python-rpm-generators
 BuildArch:      noarch
 
 %description
@@ -34,6 +36,18 @@
 You should BuildRequire this package unless you are sure that you
 are only building for distros newer than Leap 42.2
 
+%package -n python-rpm-generators
+Summary:        Dependency generator dependencies for Python RPMs
+Requires:       %{name} = %{version}-%{release}
+# Fedora compatibility
+Provides:       python3-rpm-generators
+# For the dep generator macros
+Requires:       python3-setuptools
+
+%description -n python-rpm-generators
+This package contains the dependencies for Python RPMs to generate
+dependencies automatically.
+
 %prep
 %setup -q
 %if 0%{?suse_version} < 1330
@@ -52,4 +66,7 @@
 %doc README.md
 %{_rpmconfigdir}/macros.d/macros.python_all
 
+%files -n python-rpm-generators
+# Nothing here for now...
+
 %changelog

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.i0UnEy/_old  2020-01-23 16:10:09.215608802 +0100
+++ /var/tmp/diff_new_pack.i0UnEy/_new  2020-01-23 16:10:09.215608802 +0100
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">git://github.com/openSUSE/python-rpm-macros.git</param>
-              <param 
name="changesrevision">da4c63c3f7e3d7d6899ea9698c928ba145ed2b19</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">8e390130273e5c31158c8c829970d378d62e74ae</param></service></servicedata>
\ No newline at end of file

++++++ python-rpm-macros-20191104.08e6493.tar.bz2 -> 
python-rpm-macros-20200117.8e39013.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rpm-macros-20191104.08e6493/README.md 
new/python-rpm-macros-20200117.8e39013/README.md
--- old/python-rpm-macros-20191104.08e6493/README.md    2019-11-04 
10:53:17.000000000 +0100
+++ new/python-rpm-macros-20200117.8e39013/README.md    2020-01-17 
13:31:41.000000000 +0100
@@ -77,6 +77,17 @@
 * __`%{python_module modname [= version]}`__ expands to `$flavor-modname [= 
version]` for every
 flavor. Intended as: `BuildRequires: %{python_module foo}`.
 
+* __`%{python_dist_name modname}`__. Given a standardized name (i.e. dist 
name, name on PyPI) of `modname`,
+it will convert it to a canonical format.
+
+* __`%{python2_dist modname}`__. Given a standardized name (i.e. dist name, 
name on PyPI) of `modname`,
+it will convert it to a canonical format, and evaluates to 
python2.Ydist(CANONICAL_NAME), which is useful
+when listing dependencies. Intended as `(Build)Requires: %{python2_dist foo}`.
+
+* __`%{python3_dist modname}`__. Given a standardized name (i.e. dist name, 
name on PyPI) of `modname`,
+it will convert it to a canonical format, and evaluates to 
python3.Ydist(CANONICAL_NAME), which is useful
+when listing dependencies. Intended as `(Build)Requires: %{python3_dist foo}`.
+
 * __`%python_flavor`__ expands to the `%pythons` entry that is currently being 
processed.  
 Does not apply in `%prep`, `%build`, `%install` and `%check` sections, except 
when evaluated
 as `%{$python_flavor}` in `%python_expand`.
@@ -133,6 +144,12 @@
 * __`%python_subpackages`__ expands to the autogenerated subpackages. This 
should go at the end of the
 main headers section.
 
+* __`%python_enable_dependency_generator`__ expands to a define to enable 
automatic requires generation
+of Python module dependencies using egg-info/dist-info metadata. This should 
go above the
+`%python_subpackages` macro, preferably closer to the top of the spec. 
Intended usage:
+`%{?python_enable_dependency_generator}`. This macro will eventually be 
removed when the generator
+is configured to automatically run, hence the `?` at the beginning of the 
macro invocation.
+
 Alternative-related, general:
 
 * __`%prepare_alternative [-t <targetfile> ] <name>`__  replaces 
`<targetfile>` with a symlink to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-rpm-macros-20191104.08e6493/macros/010-common-defs 
new/python-rpm-macros-20200117.8e39013/macros/010-common-defs
--- old/python-rpm-macros-20191104.08e6493/macros/010-common-defs       
2019-11-04 10:53:17.000000000 +0100
+++ new/python-rpm-macros-20200117.8e39013/macros/010-common-defs       
2020-01-17 13:31:41.000000000 +0100
@@ -49,6 +49,64 @@
 
 %py_ver  %python_version
 
+##### Python dependency generator macros #####
+
+# === Macros for Build/Requires tags using Python dist tags ===
+# - 
https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
+
+# Converts Python dist name to a canonical format
+%python_dist_name() %{lua:\
+        name = rpm.expand("%{?1:%{1}}");\
+        canonical = string.gsub(string.lower(name), "[^%w%.]+", "-");\
+        print(canonical);\
+}
+
+# Creates Python 2 dist tag(s) after converting names to canonical format
+#   Needs to first put all arguments into a list, because invoking a different
+#   macro (%python_dist_name) overwrites them
+%python2_dist() %{lua:\
+        args = {}\
+        arg = 1\
+        while (true) do\
+                name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}");\
+                if (name == nil or name == '') then\
+                        break\
+                end\
+                args[arg] = name\
+                arg = arg + 1\
+        end\
+        for arg, name in ipairs(args) do\
+                canonical = rpm.expand("%python_dist_name " .. name);\
+                print("python" .. rpm.expand("%python2_version") .. "dist(" .. 
canonical .. ") ");\
+        end\
+}
+
+# Creates Python 3 dist tag(s) after converting names to canonical format
+#   Needs to first put all arguments into a list, because invoking a different
+#   macro (%python_dist_name) overwrites them
+%python3_dist() %{lua:\
+        args = {}\
+        arg = 1\
+        while (true) do\
+                name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}");\
+                if (name == nil or name == '') then\
+                        break\
+                end\
+                args[arg] = name\
+                arg = arg + 1\
+        end\
+        for arg, name in ipairs(args) do\
+                canonical = rpm.expand("%python_dist_name " .. name);\
+                print("python" .. rpm.expand("%python3_version") .. "dist(" .. 
canonical .. ") ");\
+        end\
+}
+
+# === Macros to control dependency generator ===
+# - https://fedoraproject.org/wiki/Changes/EnablingPythonGenerators
+%python_enable_dependency_generator() \
+%global __pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires \
+%{nil}
+
 ##### Pytest macros #####
 
 
%pytest_arch(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
 %{lua: local args = rpm.expand("%**") print(rpm.expand("%{python_expand 
PYTHONPATH=$PYTHONPATH:%{buildroot}%{$python_sitearch} 
py.test-%{$python_bin_suffix} --ignore=_build.python2 --ignore=_build.python3 
--ignore=_build.pypy3 -v " .. args .. "}")) }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-rpm-macros-20191104.08e6493/macros/030-fallbacks 
new/python-rpm-macros-20200117.8e39013/macros/030-fallbacks
--- old/python-rpm-macros-20191104.08e6493/macros/030-fallbacks 2019-11-04 
10:53:17.000000000 +0100
+++ new/python-rpm-macros-20200117.8e39013/macros/030-fallbacks 2020-01-17 
13:31:41.000000000 +0100
@@ -16,4 +16,8 @@
 %py2_ver     %python2_version
 %py3_ver     %python3_version
 
+%py_dist_name() %{python_dist_name %{?**}}
+%py2_dist() %{python2_dist %{?**}}
+%py3_dist() %{python3_dist %{?**}}
+
 %python2_prefix   %{?python2_package_prefix}%{?!python2_package_prefix:python}


Reply via email to