| 1 |
Description: Migrate to PEP 517 build system and keep Python 3.6 compatibility |
| 2 |
Introduce pyproject.toml with [build-system] using setuptools.build_meta to |
| 3 |
drive builds through the PEP 517 interface. This eliminates the "setup.py |
| 4 |
install is deprecated" warnings triggered by frontend tools like pip and |
| 5 |
pybuild. To retain Python 3.6 support, the build requirement is lowered to |
| 6 |
setuptools>=40.8, as setuptools 59.7.0 officially dropped Python 3.6. |
| 7 |
Because these older setuptools versions cannot parse PEP 621 [project] |
| 8 |
tables, all package metadata must remain in setup.py. |
| 9 |
. |
| 10 |
The module-level version import in setup.py is replaced with a hardcoded |
| 11 |
string to prevent a ModuleNotFoundError during PEP 517 isolated builds. |
| 12 |
The set_version.sh script is updated to keep this version synchronized |
| 13 |
alongside cpuset/version.py on every release. Finally, the non-existent |
| 14 |
ChangeLog entry is removed from MANIFEST.in to clear build warnings, and |
| 15 |
the License classifier is omitted from setup.py to avoid deprecation |
| 16 |
warnings on modern setuptools. |
| 17 |
From: Fukui Daichi <[email protected]> |
| 18 |
Last-Update: 2026-06-30 |
| 19 |
Forwarded: https://github.com/SUSE/cpuset/pull/56 |
| 20 |
|
| 21 |
--- |
| 22 |
MANIFEST.in | 2 +- |
| 23 |
cpuset/version.py | 2 +- |
| 24 |
pyproject.toml | 3 +++ |
| 25 |
set_version.sh | 3 ++- |
| 26 |
setup.py | 40 ++++++++++++++++++++-------------------- |
| 27 |
5 files changed, 27 insertions(+), 23 deletions(-) |
| 28 |
create mode 100644 pyproject.toml |
| 29 |
|
| 30 |
diff --git a/MANIFEST.in b/MANIFEST.in |
| 31 |
index 0a8a5c5..b18a1e4 100644 |
| 32 |
--- a/MANIFEST.in |
| 33 |
+++ b/MANIFEST.in |
| 34 |
@@ -1,3 +1,3 @@ |
| 35 |
|
| 36 |
+include README Makefile MANIFEST MANIFEST.in AUTHORS COPYING INSTALL NEWS cset.init.d |
| 37 |
include t/README |
| 38 |
include doc/*.txt doc/Makefile doc/*.conf doc/callouts.xsl doc/*.1 doc/*.html |
| 39 |
diff --git a/cpuset/version.py b/cpuset/version.py |
| 40 |
index 7e3e6e9..fed4248 100644 |
| 41 |
--- a/cpuset/version.py |
| 42 |
+++ b/cpuset/version.py |
| 43 |
@@ -17,4 +17,4 @@ along with this program; if not, write to the Free Software |
| 44 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 45 |
""" |
| 46 |
|
| 47 |
|
| 48 |
+version = '1.6.2' |
| 49 |
diff --git a/pyproject.toml b/pyproject.toml |
| 50 |
new file mode 100644 |
| 51 |
index 0000000..706473a |
| 52 |
--- /dev/null |
| 53 |
+++ b/pyproject.toml |
| 54 |
@@ -0,0 +1,3 @@ |
| 55 |
+[build-system] |
| 56 |
+requires = ["setuptools>=40.8"] |
| 57 |
+build-backend = "setuptools.build_meta" |
| 58 |
diff --git a/set_version.sh b/set_version.sh |
| 59 |
index 23efd80..ebd12e8 100755 |
| 60 |
--- a/set_version.sh |
| 61 |
+++ b/set_version.sh |
| 62 |
@@ -8,6 +8,7 @@ sed -i "4s/.*/v$VER, $DATE_SHORT/" doc/cset{,-proc,-set,-shield}.txt |
| 63 |
sed -i "s/cset v\([[:digit:]]\+\.\)\+[[:digit:]]\+ /cset v$VER /" doc/tutorial.txt |
| 64 |
sed -i "s/^\(Version:[[:space:]]*\).*/\1$VER/" cpuset.spec |
| 65 |
sed -i "s/^\(version = '*\).*\('[[:space:]]*$\)/\1$VER\2/" cpuset/version.py |
| 66 |
+sed -i "s/^VERSION = .*/VERSION = \"$VER\"/" setup.py |
| 67 |
sed -i "1i \ |
| 68 |
============================================================\n\ |
| 69 |
Cpuset $VER ($DATE)\n\ |
| 70 |
@@ -18,7 +19,7 @@ http://download.opensuse.org/hardware/cpuset/\n\ |
| 71 |
${EDITOR:-vi} NEWS |
| 72 |
TEMP=$(mktemp) |
| 73 |
sed '6,/^===/{/^=/d;p};d' NEWS > $TEMP |
| 74 |
|
| 75 |
+git commit -s -t $TEMP cpuset.spec cpuset/version.py setup.py NEWS \ |
| 76 |
doc/cset{,-proc,-set,-shield}.txt doc/tutorial.txt |
| 77 |
rm -f $TEMP |
| 78 |
git tag v$VER |
| 79 |
diff --git a/setup.py b/setup.py |
| 80 |
index 1ee6bc7..4dbdc82 100755 |
| 81 |
--- a/setup.py |
| 82 |
+++ b/setup.py |
| 83 |
@@ -1,20 +1,20 @@ |
| 84 |
#!/usr/bin/env python |
| 85 |
|
| 86 |
import glob |
| 87 |
|
| 88 |
+from setuptools import setup |
| 89 |
|
| 90 |
|
| 91 |
+VERSION = "1.6.2" |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
+setup(name='cpuset', |
| 104 |
+ version=VERSION, |
| 105 |
+ license='GPL-2.0-only', |
| 106 |
+ author='Alex Tsariounov', |
| 107 |
+ author_email='[email protected]', |
| 108 |
+ maintainer='Michal Koutny', |
| 109 |
+ maintainer_email='[email protected]', |
| 110 |
+ url='https://github.com/SUSE/cpuset', |
| 111 |
+ description='Allows manipulation of cpusets and provides higher level functions.', |
| 112 |
+ long_description= |
| 113 |
'Cpuset is a Python application to make using the cpusets facilities in the Linux\n' |
| 114 |
'kernel easier. The actual included command is called cset and it allows\n' |
| 115 |
'manipulation of cpusets on the system and provides higher level functions such as\n' |
| 116 |
@@ -23,16 +23,16 @@ setup(name = 'cpuset', |
| 117 |
'Development Status :: 5 - Production/Stable', |
| 118 |
'Environment :: Console', |
| 119 |
'Intended Audience :: System Administrators', |
| 120 |
|
| 121 |
'Operating System :: POSIX :: Linux', |
| 122 |
'Programming Language :: Python :: 3', |
| 123 |
'Topic :: System :: Systems Administration', |
| 124 |
], |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
+ python_requires='>=3.6', |
| 133 |
+ scripts=['cset'], |
| 134 |
+ packages=['cpuset', 'cpuset.commands'], |
| 135 |
+ data_files=[ |
| 136 |
+ ('share/doc/packages/cpuset', ['README', 'COPYING', 'AUTHORS', 'NEWS', 'INSTALL']), |
| 137 |
+ ('share/doc/packages/cpuset', glob.glob('doc/*.txt')), |
| 138 |
+ ('share/doc/packages/cpuset/html', glob.glob('doc/*.html')), |
| 139 |
+ ] |
| 140 |
) |
| 141 |
|
| 142 |
2.53.0 |
| 143 |
|