!7 Adapting to the pyproject.toml compilation mode
From: @caodongxia Reviewed-by: @cherry530 Signed-off-by: @cherry530
This commit is contained in:
commit
496a69ea46
@ -1,24 +0,0 @@
|
||||
From 0201946c466051169431b70aaf1f2200a1bf1c26 Mon Sep 17 00:00:00 2001
|
||||
From: liqiuyu123 <liqiuyu@kylinos.cn>
|
||||
Date: Fri, 28 Oct 2022 10:52:03 +0800
|
||||
Subject: [PATCH] add-setup.py
|
||||
|
||||
---
|
||||
setup.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
create mode 100644 setup.py
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
new file mode 100644
|
||||
index 0000000..86aab1f
|
||||
--- /dev/null
|
||||
+++ b/setup.py
|
||||
@@ -0,0 +1,5 @@
|
||||
+from setuptools import setup
|
||||
+
|
||||
+setup(
|
||||
+ use_scm_version={"write_to": "src/apipkg/version.py"},
|
||||
+)
|
||||
--
|
||||
2.37.1.windows.1
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
From 428c1d0662705151f09a85d6b08200ea86df98c2 Mon Sep 17 00:00:00 2001
|
||||
From: liqiuyu123 <liqiuyu@kylinos.cn>
|
||||
Date: Fri, 28 Oct 2022 10:56:05 +0800
|
||||
Subject: [PATCH] add-setup.cfg
|
||||
|
||||
---
|
||||
setup.cfg | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 54 insertions(+)
|
||||
create mode 100644 setup.cfg
|
||||
|
||||
diff --git a/setup.cfg b/setup.cfg
|
||||
new file mode 100644
|
||||
index 0000000..d3697c4
|
||||
--- /dev/null
|
||||
+++ b/setup.cfg
|
||||
@@ -0,0 +1,54 @@
|
||||
+[metadata]
|
||||
+name = apipkg
|
||||
+description = apipkg: namespace control and lazy-import mechanism
|
||||
+long_description = file: README.rst
|
||||
+long_description_content_type = text/x-rst
|
||||
+url = https://github.com/pytest-dev/apipkg
|
||||
+author = holger krekel
|
||||
+maintainer = Ronny Pfannschmidt
|
||||
+maintainer_email = opensource@ronnypfannschmidt.de
|
||||
+license = MIT
|
||||
+license_file = LICENSE
|
||||
+platforms =
|
||||
+ unix
|
||||
+ linux
|
||||
+ osx
|
||||
+ cygwin
|
||||
+ win32
|
||||
+classifiers =
|
||||
+ Development Status :: 4 - Beta
|
||||
+ Intended Audience :: Developers
|
||||
+ License :: OSI Approved :: MIT License
|
||||
+ Operating System :: MacOS :: MacOS X
|
||||
+ Operating System :: Microsoft :: Windows
|
||||
+ Operating System :: POSIX
|
||||
+ Programming Language :: Python
|
||||
+ Programming Language :: Python :: 2
|
||||
+ Programming Language :: Python :: 2.7
|
||||
+ Programming Language :: Python :: 3
|
||||
+ Programming Language :: Python :: 3.5
|
||||
+ Programming Language :: Python :: 3.6
|
||||
+ Programming Language :: Python :: 3.7
|
||||
+ Programming Language :: Python :: 3.8
|
||||
+ Programming Language :: Python :: 3.9
|
||||
+ Programming Language :: Python :: Implementation :: CPython
|
||||
+ Topic :: Software Development :: Libraries
|
||||
+
|
||||
+[options]
|
||||
+packages = find:
|
||||
+python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
|
||||
+package_dir = =src
|
||||
+setup_requires =
|
||||
+ setuptools>=30.3.0
|
||||
+ setuptools_scm
|
||||
+
|
||||
+[options.packages.find]
|
||||
+where = src
|
||||
+
|
||||
+[wheel]
|
||||
+universal = true
|
||||
+
|
||||
+[egg_info]
|
||||
+tag_build =
|
||||
+tag_date = 0
|
||||
+
|
||||
--
|
||||
2.37.1.windows.1
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
%global _empty_manifest_terminate_build 0
|
||||
Name: python-apipkg
|
||||
Version: 3.0.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Namespace control and lazy-import mechanism
|
||||
License: MIT
|
||||
URL: ttps://github.com/pytest-dev/apipkg
|
||||
Source0: https://files.pythonhosted.org/packages/dc/d8/1883595b81446c61380bdfe10e67f593508c688692b2ce6bf9cc1dc4d007/apipkg-3.0.1.tar.gz
|
||||
Patch0: 0001-add-setup.py.patch
|
||||
Patch1: 0002-add-setup.cfg.patch
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@ -23,6 +21,9 @@ BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-setuptools_scm
|
||||
BuildRequires: python3-hatchling
|
||||
BuildRequires: python3-hatch-vcs
|
||||
BuildRequires: python3-wheel
|
||||
%description -n python3-apipkg
|
||||
With apipkg you can control the exported namespace of a Python package and greatly reduce the
|
||||
number of imports for your users. It is a small pure Python module that works on CPython 2.7
|
||||
@ -39,15 +40,13 @@ and 3.4+, Jython and PyPy. It cooperates well with Python’s help() system, cus
|
||||
and common command-line completion tools.
|
||||
|
||||
%prep
|
||||
%autosetup -n apipkg-%{version}
|
||||
%patch0
|
||||
%patch1
|
||||
%autosetup -n apipkg-%{version} -p1
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_build
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install apipkg==%{version}
|
||||
install -d -m755 %{buildroot}/%{_pkgdocdir}
|
||||
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
|
||||
@ -76,11 +75,15 @@ mv %{buildroot}/doclist.lst .
|
||||
|
||||
%files -n python3-apipkg -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
%{python3_sitelib}/apipkg
|
||||
|
||||
%files help -f doclist.lst
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Apr 27 2023 caodongxia <caodongxia@h-partners.com> - 3.0.1-2
|
||||
- Adapting to the pyproject.toml compilation mode
|
||||
|
||||
* Fri Oct 28 2022 liqiuyu <liqiuyu@kylinos.cn> - 3.0.1-1
|
||||
- Upgrade package to version 3.0.1
|
||||
|
||||
@ -91,4 +94,4 @@ mv %{buildroot}/doclist.lst .
|
||||
- Remove Subpackage python2-apipkg
|
||||
|
||||
* Thu Mar 12 2020 chenli <chenli147@huawei.com> - 1.5-2
|
||||
- Init package.
|
||||
- Init package.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user