Prechádzať zdrojové kódy

Merge pull request #7977 from ThomasWaldmann/drop-setup-requires-1.4

drop setup_requires, use pip and build
TW 1 rok pred
rodič
commit
c14af19576

+ 1 - 2
.github/workflows/ci.yml

@@ -122,8 +122,7 @@ jobs:
         # so, set it here, again.
         PKG_CONFIG_PATH: "/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH"
       run: |
-        # pip install -e .
-        python setup.py -v develop
+        pip install -e .
     - name: run pytest via tox
       env:
         # we already have that in the global env, but something is broken and overwrites that.

+ 1 - 2
Vagrantfile

@@ -193,8 +193,7 @@ def install_borg(fuse)
     pip install -U wheel  # upgrade wheel, might be too old
     cd borg
     pip install -r requirements.d/development.lock.txt
-    python setup.py clean
-    python setup.py clean2
+    python setup.py clean clean2
     pip install -e .[#{fuse}]
   EOF
 end

+ 1 - 0
requirements.d/development.lock.txt

@@ -2,6 +2,7 @@ setuptools==69.0.3
 setuptools-scm==8.0.4
 pip==23.3.2
 virtualenv==20.25.0
+build==1.0.3
 pkgconfig==1.5.5
 tox==4.11.4
 pytest==7.4.3

+ 1 - 0
requirements.d/development.txt

@@ -2,6 +2,7 @@ setuptools>=64
 setuptools_scm>=8
 pip
 virtualenv
+build
 pkgconfig
 tox
 pytest

+ 5 - 2
scripts/msys2-build

@@ -1,5 +1,8 @@
 #!/bin/bash
 
-python setup.py build_ext --inplace
-python setup.py bdist_wheel
+# build borg.exe
+SETUPTOOLS_USE_DISTUTILS=stdlib pip install -e .
 pyinstaller -y scripts/borg.exe.spec
+
+# build sdist and wheel in dist/...
+SETUPTOOLS_USE_DISTUTILS=stdlib python -m build

+ 1 - 1
scripts/msys2-install-deps

@@ -1,4 +1,4 @@
 #!/bin/bash
 
-pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python,cython,python-setuptools,python-wheel,python-pkgconfig,python-packaging,python-msgpack,python-pip}
+pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python,cython,python-setuptools,python-wheel,python-build,python-pkgconfig,python-packaging,python-msgpack,python-pip}
 pip install pyinstaller==5.13.2

+ 1 - 1
scripts/sdist-sign

@@ -13,7 +13,7 @@ else
     GPG=qubes-gpg-client-wrapper
 fi
 
-python setup.py sdist
+python -m build
 
 D=dist/borgbackup-$R.tar.gz
 

+ 0 - 1
setup.py

@@ -306,7 +306,6 @@ setup(
     },
     cmdclass=cmdclass,
     ext_modules=ext_modules,
-    setup_requires=['setuptools_scm>=1.7'],
     install_requires=install_requires,
     extras_require=extras_require,
     python_requires='>=3.9',