Move from legacy setuptools to pyproject toml
This commit is contained in:
parent
f6f3ba65f2
commit
4def2a350e
10
PKGBUILD
10
PKGBUILD
@ -1,13 +1,13 @@
|
|||||||
# Maintainer: Eric Torres <eric.torres@its-et.me>
|
# Maintainer: Eric Torres <eric.torres@its-et.me>
|
||||||
pkgname=packaging-scripts
|
pkgname=packaging-scripts
|
||||||
pkgver=1.7.1
|
pkgver=1.7.1
|
||||||
pkgrel=4
|
pkgrel=5
|
||||||
pkgdesc="A set of helper scripts for handling Arch Linux packages"
|
pkgdesc="A set of helper scripts for handling Arch Linux packages"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
groups=(pacman-helpers)
|
groups=(pacman-helpers)
|
||||||
depends=(gist mlocate pacman python pyalpm)
|
depends=(gist mlocate pacman python pyalpm)
|
||||||
makedepends=(git python-setuptools)
|
makedepends=(git python-build python-installer python-wheel)
|
||||||
optdepends=('fzf: for the fqo script'
|
optdepends=('fzf: for the fqo script'
|
||||||
'mlocate: for the fqo script')
|
'mlocate: for the fqo script')
|
||||||
checkdepends=(python-hypothesis python-pytest)
|
checkdepends=(python-hypothesis python-pytest)
|
||||||
@ -17,18 +17,18 @@ sha256sums=('SKIP')
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/$pkgname"
|
cd "$srcdir/$pkgname"
|
||||||
python setup.py build
|
python -m build --no-isolation
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd "$srcdir/$pkgname"
|
cd "$srcdir/$pkgname"
|
||||||
python -m unittest
|
pytest
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$srcdir/$pkgname"
|
cd "$srcdir/$pkgname"
|
||||||
|
|
||||||
python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||||
|
|
||||||
# install README
|
# install README
|
||||||
install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
|
install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
|
||||||
|
2
pyproject.toml
Normal file
2
pyproject.toml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[build-system]
|
||||||
|
requires=["build", "wheel"]
|
31
setup.py
31
setup.py
@ -1,31 +0,0 @@
|
|||||||
import setuptools
|
|
||||||
|
|
||||||
# ========== Constants ==========
|
|
||||||
EXCLUDED_PACKAGES = ["test", "tests"]
|
|
||||||
PACKAGES = setuptools.find_packages(exclude=EXCLUDED_PACKAGES)
|
|
||||||
SCRIPTS = ["bin/addpkg", "bin/delpkg", "bin/fqo", "bin/pug2"]
|
|
||||||
|
|
||||||
|
|
||||||
# ========== Functions ==========
|
|
||||||
with open("README.rst", "r") as fh:
|
|
||||||
long_description = fh.read()
|
|
||||||
|
|
||||||
|
|
||||||
# ========== Package Setup ==========
|
|
||||||
setuptools.setup(
|
|
||||||
name="packaging_scripts",
|
|
||||||
version="1.7.1",
|
|
||||||
author="Eric Russel Torres",
|
|
||||||
author_email="erictorres4@protonmail.com",
|
|
||||||
description="A set of scripts for automating pacman database interaction",
|
|
||||||
long_description=long_description,
|
|
||||||
long_description_content_type="text/plain",
|
|
||||||
url="",
|
|
||||||
packages=PACKAGES,
|
|
||||||
scripts=SCRIPTS,
|
|
||||||
classifiers=[
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"License :: OSI Approved :: MIT License",
|
|
||||||
"Operating System :: OS Independent",
|
|
||||||
],
|
|
||||||
)
|
|
Loading…
x
Reference in New Issue
Block a user