Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-hatchling for 
openSUSE:Factory checked in at 2023-05-13 17:17:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hatchling (Old)
 and      /work/SRC/openSUSE:Factory/.python-hatchling.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-hatchling"

Sat May 13 17:17:27 2023 rev:17 rq:1086981 version:1.17.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hatchling/python-hatchling.changes        
2023-05-10 16:17:19.574549419 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-hatchling.new.1533/python-hatchling.changes  
    2023-05-13 17:17:41.954401127 +0200
@@ -1,0 +2,18 @@
+Sat May 13 08:25:01 UTC 2023 - Benoît Monin <benoit.mo...@gmx.fr>
+
+- update to version 1.17.0:
+  * The app build target now embeds the project version in the name
+    of binaries
+
+-------------------------------------------------------------------
+Thu May 11 18:48:27 UTC 2023 - Benoît Monin <benoit.mo...@gmx.fr>
+
+- update to version 1.16.1:
+  * Fix determining the built executable path for the app build
+    target option when using a local copy of PyApp when there is
+    an explicit target triple set
+- additional changes from version 1.16.0:
+  * Add app build target option to build using a local copy of
+    the PyApp repository
+
+-------------------------------------------------------------------

Old:
----
  hatchling-1.15.0.tar.gz

New:
----
  hatchling-1.17.0.tar.gz

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

Other differences:
------------------
++++++ python-hatchling.spec ++++++
--- /var/tmp/diff_new_pack.VGF9oL/_old  2023-05-13 17:17:42.422403819 +0200
+++ /var/tmp/diff_new_pack.VGF9oL/_new  2023-05-13 17:17:42.426403842 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-hatchling
-Version:        1.15.0
+Version:        1.17.0
 Release:        0
 Summary:        Build backend used by Hatch
 License:        MIT

++++++ hatchling-1.15.0.tar.gz -> hatchling-1.17.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hatchling-1.15.0/PKG-INFO 
new/hatchling-1.17.0/PKG-INFO
--- old/hatchling-1.15.0/PKG-INFO       2020-02-02 01:00:00.000000000 +0100
+++ new/hatchling-1.17.0/PKG-INFO       2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: hatchling
-Version: 1.15.0
+Version: 1.17.0
 Summary: Modern, extensible Python build backend
 Project-URL: Homepage, https://hatch.pypa.io/latest/
 Project-URL: Sponsor, https://github.com/sponsors/ofek
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hatchling-1.15.0/src/hatchling/__about__.py 
new/hatchling-1.17.0/src/hatchling/__about__.py
--- old/hatchling-1.15.0/src/hatchling/__about__.py     2020-02-02 
01:00:00.000000000 +0100
+++ new/hatchling-1.17.0/src/hatchling/__about__.py     2020-02-02 
01:00:00.000000000 +0100
@@ -1 +1 @@
-__version__ = '1.15.0'
+__version__ = '1.17.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hatchling-1.15.0/src/hatchling/builders/app.py 
new/hatchling-1.17.0/src/hatchling/builders/app.py
--- old/hatchling-1.15.0/src/hatchling/builders/app.py  2020-02-02 
01:00:00.000000000 +0100
+++ new/hatchling-1.17.0/src/hatchling/builders/app.py  2020-02-02 
01:00:00.000000000 +0100
@@ -125,27 +125,49 @@
         # https://doc.rust-lang.org/cargo/reference/config.html#buildtarget
         build_target = os.environ.get('CARGO_BUILD_TARGET', '')
 
-        with tempfile.TemporaryDirectory() as temp_dir:
-            temp_exe_path = os.path.join(temp_dir, 'bin', 'pyapp.exe' if 
on_windows else 'pyapp')
+        # This will determine whether we install from crates.io or build 
locally and is currently required for
+        # cross compilation: https://github.com/cross-rs/cross/issues/1215
+        repo_path = os.environ.get('PYAPP_REPO', '')
 
-            install_command = [cargo_path, 'install', 'pyapp', '--force', 
'--root', temp_dir]
-            if self.config.pyapp_version:
-                install_command.extend(['--version', 
self.config.pyapp_version])
+        with tempfile.TemporaryDirectory() as temp_dir:
+            exe_name = 'pyapp.exe' if on_windows else 'pyapp'
+            if repo_path:
+                context_dir = repo_path
+                target_dir = os.path.join(temp_dir, 'build')
+                if build_target:
+                    temp_exe_path = os.path.join(target_dir, build_target, 
'release', exe_name)
+                else:
+                    temp_exe_path = os.path.join(target_dir, 'release', 
exe_name)
+                install_command = [cargo_path, 'build', '--release', 
'--target-dir', target_dir]
+            else:
+                context_dir = temp_dir
+                temp_exe_path = os.path.join(temp_dir, 'bin', exe_name)
+                install_command = [cargo_path, 'install', 'pyapp', '--force', 
'--root', temp_dir]
+                if self.config.pyapp_version:
+                    install_command.extend(['--version', 
self.config.pyapp_version])
 
             if self.config.scripts:
                 for script in self.config.scripts:
                     env = dict(base_env)
                     env['PYAPP_EXEC_SPEC'] = self.metadata.core.scripts[script]
 
-                    self.cargo_build(install_command, cwd=temp_dir, env=env)
+                    self.cargo_build(install_command, cwd=context_dir, env=env)
 
-                    exe_stem = f'{script}-{build_target}' if build_target else 
script
+                    exe_stem = (
+                        f'{script}-{self.metadata.version}-{build_target}'
+                        if build_target
+                        else f'{script}-{self.metadata.version}'
+                    )
                     exe_path = os.path.join(app_dir, f'{exe_stem}.exe' if 
on_windows else exe_stem)
                     shutil.move(temp_exe_path, exe_path)
             else:
-                self.cargo_build(install_command, cwd=temp_dir, env=base_env)
+                self.cargo_build(install_command, cwd=context_dir, 
env=base_env)
 
-                exe_stem = f'{self.metadata.name}-{build_target}' if 
build_target else self.metadata.name
+                exe_stem = (
+                    
f'{self.metadata.name}-{self.metadata.version}-{build_target}'
+                    if build_target
+                    else f'{self.metadata.name}-{self.metadata.version}'
+                )
                 exe_path = os.path.join(app_dir, f'{exe_stem}.exe' if 
on_windows else exe_stem)
                 shutil.move(temp_exe_path, exe_path)
 

Reply via email to