diff --git a/PKGBUILD b/PKGBUILD index 83e2714..d88cbcd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,13 +1,13 @@ # Maintainer: Eric Torres pkgname=packaging-scripts pkgver=1.7.1 -pkgrel=5 +pkgrel=4 pkgdesc="A set of helper scripts for handling Arch Linux packages" arch=('any') license=('MIT') groups=(pacman-helpers) depends=(gist mlocate pacman python pyalpm) -makedepends=(git python-build python-installer python-wheel) +makedepends=(git python-setuptools) optdepends=('fzf: for the fqo script' 'mlocate: for the fqo script') checkdepends=(python-hypothesis python-pytest) @@ -17,18 +17,18 @@ sha256sums=('SKIP') build() { cd "$srcdir/$pkgname" - python -m build --no-isolation + python setup.py build } check() { cd "$srcdir/$pkgname" - pytest + python -m unittest } package() { cd "$srcdir/$pkgname" - python -m installer --destdir="$pkgdir" dist/*.whl + python setup.py install --root="$pkgdir/" --optimize=1 --skip-build # install README install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst" diff --git a/pyproject.toml b/pyproject.toml index d7e1652..48eddb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,2 @@ [build-system] -requires=["build", "wheel"] - -[tool.build_find] -paths=["packaging_scripts"] +requires=["build", "setuptools", "wheel"] diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..11f43a8 --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +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", + ], +)