Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-fastbencode for 
openSUSE:Factory checked in at 2022-11-09 12:57:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-fastbencode (Old)
 and      /work/SRC/openSUSE:Factory/.python-fastbencode.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-fastbencode"

Wed Nov  9 12:57:18 2022 rev:3 rq:1034461 version:0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-fastbencode/python-fastbencode.changes    
2022-10-12 18:27:36.402074904 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-fastbencode.new.1597/python-fastbencode.changes
  2022-11-09 12:57:54.984510607 +0100
@@ -1,0 +2,20 @@
+Mon Nov  7 22:52:35 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com>
+
+- Update to version 0.1 
+  * Make C extension mandatory when built in cibuildwheel
+  * Rely on standard infra for optionally building extension.
+  * Don't install wheel explicitly
+  * Fix uploading artifacts.
+
+- Update to version 0.0.15
+  * Publish wheels from the right directory.
+
+- Update to version 0.0.14.
+  * Depend on packaging for packaging.version.
+  * Add pyproject.toml
+  * Build wheels on pull request.
+  * Build python wheels.
+  * Migrate to setup.cfg.
+  * Ship py.typed.
+
+-------------------------------------------------------------------

Old:
----
  fastbencode-0.0.12.tar.gz

New:
----
  fastbencode-0.1.tar.gz

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

Other differences:
------------------
++++++ python-fastbencode.spec ++++++
--- /var/tmp/diff_new_pack.Ag1biG/_old  2022-11-09 12:57:55.528513674 +0100
+++ /var/tmp/diff_new_pack.Ag1biG/_new  2022-11-09 12:57:55.532513697 +0100
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python3-%{**}}
 Name:           python-fastbencode
-Version:        0.0.12
+Version:        0.1
 Release:        0
 Summary:        Implementation of the bencode serialization format
 License:        GPL-2.0-or-later

++++++ fastbencode-0.0.12.tar.gz -> fastbencode-0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fastbencode-0.0.12/.github/workflows/disperse.yml 
new/fastbencode-0.1/.github/workflows/disperse.yml
--- old/fastbencode-0.0.12/.github/workflows/disperse.yml       1970-01-01 
01:00:00.000000000 +0100
+++ new/fastbencode-0.1/.github/workflows/disperse.yml  2022-10-28 
00:07:57.000000000 +0200
@@ -0,0 +1,24 @@
+---
+name: Disperse configuration
+
+"on":
+  - push
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up Python
+        uses: actions/setup-python@v2
+      - name: Install dependencies
+        run: |
+          sudo apt install protobuf-compiler
+      - name: Install disperse
+        run: |
+          pip install git+https://github.com/jelmer/disperse
+      - name: Validate disperse.conf
+        run: |
+          PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python disperse validate .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fastbencode-0.0.12/.github/workflows/pythonpackage.yml 
new/fastbencode-0.1/.github/workflows/pythonpackage.yml
--- old/fastbencode-0.0.12/.github/workflows/pythonpackage.yml  2022-09-12 
17:02:19.000000000 +0200
+++ new/fastbencode-0.1/.github/workflows/pythonpackage.yml     2022-10-28 
00:07:57.000000000 +0200
@@ -20,7 +20,7 @@
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies
       run: |
-        python -m pip install --upgrade pip
+        python -m pip install --upgrade pip cython
         pip install -U pip flake8
     - name: Style checks
       run: |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fastbencode-0.0.12/.github/workflows/pythonpublish.yml 
new/fastbencode-0.1/.github/workflows/pythonpublish.yml
--- old/fastbencode-0.0.12/.github/workflows/pythonpublish.yml  1970-01-01 
01:00:00.000000000 +0100
+++ new/fastbencode-0.1/.github/workflows/pythonpublish.yml     2022-10-28 
00:07:57.000000000 +0200
@@ -0,0 +1,58 @@
+---
+name: Build Python Wheels
+
+"on":
+  push:
+
+jobs:
+  build:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ubuntu-latest, macos-latest, windows-latest]
+      fail-fast: true
+
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v3
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip cython
+          pip install setuptools wheel cibuildwheel
+      - name: Run test suite
+        run: python -m unittest fastbencode.tests.test_suite
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v1
+        if: "matrix.os == 'ubuntu-latest'"
+      - name: Build wheels
+        run: python -m cibuildwheel --output-dir wheelhouse
+        env:
+          CIBW_ARCHS_LINUX: x86_64 aarch64
+          CIBW_ARCHS_MACOS: x86_64 arm64 universal2
+          CIBW_ARCHS_WINDOWS: AMD64 x86
+      - name: Upload wheels
+        uses: actions/upload-artifact@v3
+        with:
+          path: ./wheelhouse/*.whl
+
+  publish:
+    runs-on: ubuntu-latest
+
+    needs: build
+    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
+    steps:
+      - uses: actions/setup-python@v3
+
+      - name: Install twine
+        run: |
+          python -m pip install --upgrade pip
+          pip install twine
+      - name: Download wheels
+        uses: actions/download-artifact@v2
+      - name: Display structure of downloaded files
+        run: ls -R
+      - name: Publish wheels
+        env:
+          TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
+          TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
+        run: twine upload artifact/*.whl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fastbencode-0.0.12/MANIFEST.in 
new/fastbencode-0.1/MANIFEST.in
--- old/fastbencode-0.0.12/MANIFEST.in  2022-09-12 17:02:19.000000000 +0200
+++ new/fastbencode-0.1/MANIFEST.in     2022-10-28 00:07:57.000000000 +0200
@@ -1,3 +1,4 @@
 include README.md
 include COPYING
+include fastbencode/py.typed
 recursive-include fastbencode *.py *.pyx *.pxd *.h *.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fastbencode-0.0.12/disperse.conf 
new/fastbencode-0.1/disperse.conf
--- old/fastbencode-0.0.12/disperse.conf        1970-01-01 01:00:00.000000000 
+0100
+++ new/fastbencode-0.1/disperse.conf   2022-10-28 00:07:57.000000000 +0200
@@ -0,0 +1,8 @@
+# See https://github.com/jelmer/disperse
+timeout_days: 5
+tag_name: "v$VERSION"
+verify_command: "python3 -m unittest fastbencode.tests.test_suite"
+update_version {
+  path: "fastbencode/__init__.py"
+  new_line: '__version__ = $TUPLED_VERSION'
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fastbencode-0.0.12/fastbencode/__init__.py 
new/fastbencode-0.1/fastbencode/__init__.py
--- old/fastbencode-0.0.12/fastbencode/__init__.py      2022-09-12 
17:02:19.000000000 +0200
+++ new/fastbencode-0.1/fastbencode/__init__.py 2022-10-28 00:07:57.000000000 
+0200
@@ -19,6 +19,9 @@
 from typing import Type
 
 
+__version__ = (0, 1)
+
+
 _extension_load_failures = []
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fastbencode-0.0.12/pyproject.toml 
new/fastbencode-0.1/pyproject.toml
--- old/fastbencode-0.0.12/pyproject.toml       1970-01-01 01:00:00.000000000 
+0100
+++ new/fastbencode-0.1/pyproject.toml  2022-10-28 00:07:57.000000000 +0200
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools", "cython>=0.29", "packaging"]
+build-backend = "setuptools.build_meta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fastbencode-0.0.12/releaser.conf 
new/fastbencode-0.1/releaser.conf
--- old/fastbencode-0.0.12/releaser.conf        2022-09-12 17:02:19.000000000 
+0200
+++ new/fastbencode-0.1/releaser.conf   1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-# See https://github.com/jelmer/releaser
-timeout_days: 5
-tag_name: "v$VERSION"
-verify_command: "python3 setup.py test"
-github_url: "https://github.com/breezy-team/fastbencode";
-update_version {
-  path: "setup.py"
-  match: "^    version=\"(.*)\",$"
-  new_line: '    version="$VERSION",'
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fastbencode-0.0.12/setup.cfg 
new/fastbencode-0.1/setup.cfg
--- old/fastbencode-0.0.12/setup.cfg    1970-01-01 01:00:00.000000000 +0100
+++ new/fastbencode-0.1/setup.cfg       2022-10-28 00:07:57.000000000 +0200
@@ -0,0 +1,19 @@
+[metadata]
+name = fastbencode
+description = Implementation of bencode with optional fast C extensions
+maintainer = Breezy Developers
+maintainer_email = breezy-c...@googlegroups.com
+url = https://github.com/breezy-team/fastbencode
+long_description = file:README.md
+license = GPLv2 or later
+version = attr:fastbencode.__version__
+project_urls =
+    GitHub = https://github.com/breezy-team/fastbencode
+
+[options]
+packages = fastbencode
+setup_requires =
+    cython>=0.29
+
+[options.extras_require]
+cext = cython>=0.29
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fastbencode-0.0.12/setup.py 
new/fastbencode-0.1/setup.py
--- old/fastbencode-0.0.12/setup.py     2022-09-12 17:02:19.000000000 +0200
+++ new/fastbencode-0.1/setup.py        2022-10-28 00:07:57.000000000 +0200
@@ -2,8 +2,11 @@
 
 import os
 import sys
-from setuptools import setup
-from distutils.version import LooseVersion
+from setuptools import setup, Extension
+try:
+    from packaging.version import Version
+except ImportError:
+    from distutils.version import LooseVersion as Version
 
 try:
     from Cython.Distutils import build_ext
@@ -20,8 +23,8 @@
     from distutils.command.build_ext import build_ext
 else:
     minimum_cython_version = '0.29'
-    cython_version_info = LooseVersion(cython_version)
-    if cython_version_info < LooseVersion(minimum_cython_version):
+    cython_version_info = Version(cython_version)
+    if cython_version_info < Version(minimum_cython_version):
         print("Version of Cython is too old. "
               "Current is %s, need at least %s."
               % (cython_version, minimum_cython_version))
@@ -32,54 +35,6 @@
         have_cython = True
 
 
-from distutils import log
-from distutils.errors import CCompilerError, DistutilsPlatformError
-from distutils.extension import Extension
-
-
-class build_ext_if_possible(build_ext):
-
-    user_options = build_ext.user_options + [
-        ('allow-python-fallback', None,
-         "When an extension cannot be built, allow falling"
-         " back to the pure-python implementation.")
-        ]
-
-    def initialize_options(self):
-        build_ext.initialize_options(self)
-        self.allow_python_fallback = False
-
-    def run(self):
-        try:
-            build_ext.run(self)
-        except DistutilsPlatformError:
-            e = sys.exc_info()[1]
-            if not self.allow_python_fallback:
-                log.warn('\n  Cannot build extensions.\n'
-                         '  Use "build_ext --allow-python-fallback" to use'
-                         ' slower python implementations instead.\n')
-                raise
-            log.warn(str(e))
-            log.warn('\n  Extensions cannot be built.\n'
-                     '  Using the slower Python implementations instead.\n')
-
-    def build_extension(self, ext):
-        try:
-            build_ext.build_extension(self, ext)
-        except CCompilerError:
-            if not self.allow_python_fallback:
-                log.warn('\n  Cannot build extension "%s".\n'
-                         '  Use "build_ext --allow-python-fallback" to use'
-                         ' slower python implementations instead.\n'
-                         % (ext.name,))
-                raise
-            log.warn('\n  Building of "%s" extension failed.\n'
-                     '  Using the slower Python implementation instead.'
-                     % (ext.name,))
-
-
-# Override the build_ext if we have Cython available
-
 ext_modules = []
 
 
@@ -117,26 +72,11 @@
     ext_modules.append(
         Extension(
             module_name, source, define_macros=define_macros,
-            libraries=libraries, include_dirs=include_dirs))
+            libraries=libraries, include_dirs=include_dirs,
+            optional=os.environ.get('CIBUILDWHEEL', '0') != '1'))
 
 
 add_cython_extension('fastbencode._bencode_pyx')
 
-with open('README.md', 'r') as f:
-    long_description = f.read()
-
 
-setup(
-    name="fastbencode",
-    description="Implementation of bencode with optional fast C extensions",
-    version="0.0.12",
-    long_description=long_description,
-    maintainer="Breezy Developers",
-    maintainer_email="breezy-c...@googlegroups.com",
-    url="https://github.com/breezy-team/fastbencode";,
-    ext_modules=ext_modules,
-    extras_require={'cext': ['cython>=0.29']},
-    cmdclass={'build_ext': build_ext_if_possible},
-    license="GPLv2 or later",
-    test_suite="fastbencode.tests.test_suite",
-    packages=["fastbencode"])
+setup(ext_modules=ext_modules, cmdclass={'build_ext': build_ext})

Reply via email to