11
0
forked from pool/python-apipkg

- Remove python_module macro definition

- Update to 3.0.1:
  * restore tox.ini to support tox --current-env based packaging
- 3.0.0
  * add support for python 3.11 and drop dead pythons (thanks hukgo)
  * migrate to hatch
  * split up __init__.py
  * add some type annotations
- 2.1.1
  * drop the python 3.4 support marker, 2.1.0 broke it
    2.1.0 will be yanked after release

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-apipkg?expand=0&rev=12
This commit is contained in:
2022-11-29 16:55:21 +00:00
committed by Git OBS Bridge
parent b0152bfcfe
commit e904574ad0
4 changed files with 33 additions and 16 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a4be31cf8081e660d2cdea6edfb8a0f39f385866abdcfcfa45e5a0887345cb70
size 16346

BIN
apipkg-3.0.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,18 @@
-------------------------------------------------------------------
Tue Nov 29 16:53:46 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Remove python_module macro definition
- Update to 3.0.1:
* restore tox.ini to support tox --current-env based packaging
- 3.0.0
* add support for python 3.11 and drop dead pythons (thanks hukgo)
* migrate to hatch
* split up __init__.py
* add some type annotations
- 2.1.1
* drop the python 3.4 support marker, 2.1.0 broke it
2.1.0 will be yanked after release
-------------------------------------------------------------------
Sun Oct 17 12:03:03 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,6 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -%{flavor}
@@ -26,7 +25,7 @@
%bcond_with test
%endif
Name: python-apipkg%{psuffix}
Version: 2.1.0
Version: 3.0.1
Release: 0
Summary: Namespace control and lazy-import mechanism
License: MIT
@@ -34,10 +33,16 @@ Group: Development/Languages/Python
URL: https://github.com/pytest-dev/apipkg/
Source: https://files.pythonhosted.org/packages/source/a/apipkg/apipkg-%{version}.tar.gz
%if %{with test}
BuildRequires: %{python_module apipkg = %{version}}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module py}
%endif
BuildRequires: %{python_module hatch-vcs}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
@@ -55,32 +60,29 @@ can copy paste the ~200 lines of code into your project.
%prep
%autosetup -p1 -n apipkg-%{version}
# Fix Python 2 install error on old setuptools in Leap
# https://github.com/pypa/setuptools/issues/1136
sed -i '/use_scm_version/ a \ package_dir={"": "src"},' setup.py
# Set the package version static, not dynamic, to build without the .git folder
sed -i ':a;N;$!ba;s/dynamic = \[[^]]*\]/version = "%{version}"/g' pyproject.toml
%build
%python_build
%pyproject_wheel
%install
%if ! %{with test}
%python_install
%pyproject_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
PYTHONPATH=$(pwd)/src
%pytest
%endif
%if ! %{with test}
%files %{python_files}
%license LICENSE
%doc README.rst CHANGELOG
%dir %{python_sitelib}/apipkg
%{python_sitelib}/apipkg/*
%{python_sitelib}/apipkg-%{version}-py%{python_version}.egg-info
%doc README.rst
%{python_sitelib}/apipkg
%{python_sitelib}/apipkg-%{version}*-info
%endif
%changelog