Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support external dependencies #1478

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ venv
.DS_Store
**/cmd_history.txt
**/*.*~
/*.sig
/*.sig
requirements.txt
14 changes: 10 additions & 4 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ arch=(any)
url="https://github.com/archlinux/archinstall"
license=(GPL3)
depends=(python)
makedepends=(python-build python-installer python-flit python-setuptools python-sphinx python-wheel)
makedepends=(python-pip python-build python-installer python-setuptools python-sphinx python-wheel)
provides=(python-archinstall)
conflicts=(python-archinstall)
replaces=(python-archinstall)
Expand All @@ -28,7 +28,7 @@ validpgpkeys=('256F73CEEFC6705C6BBAB20E5FBBB32941E3740A') # Anton Hvornum (Torxe

prepare() {
cd $pkgname-$pkgver
# use real directories for examples and profiles, as symlinks do not work
#use real directories for examples and profiles, as symlinks do not work
# with flit or setuptools PEP517 backends
rm -fv $pkgname/{examples,profiles}
mv -v examples profiles $pkgname/
Expand All @@ -42,6 +42,12 @@ build() {

package() {
cd "$pkgname-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
# extract the dependencies from the pyparted.toml so pip can install them
grep -oP '^ *"[\s\S]+?[=><]+[\s\S]+?"' pyproject.toml > requirements.txt && sed -i 's|"||g' requirements.txt
# install the dependencies
PIP_CONFIG_FILE=/dev/null pip install --root=${pkgdir} --ignore-installed -r requirements.txt
# install archinstall
PIP_CONFIG_FILE=/dev/null pip install --root="${pkgdir}" --ignore-installed dist/*.whl
# install the docs
install -vDm 644 docs/_build/man/archinstall.1 -t "$pkgdir/usr/share/man/man1/"
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ you can replace the version of archinstall with a new version and run that with
4. Now clone the latest repository with `git clone https://github.com/archlinux/archinstall`
5. Enter the repository with `cd archinstall`
*At this stage, you can choose to check out a feature branch for instance with `git checkout v2.3.1-rc1`*
6. Build the project and install it using `python setup.py install`
6. Build the project and install it using `flit install`

After this, running archinstall with `python -m archinstall` will run against whatever branch you chose in step 5.

Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ authors = [
]
readme = "README.md"
requires-python = ">=3.10"

keywords = ["linux", "arch", "archinstall", "installer"]

classifiers = [
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX :: Linux",
]
dependencies = [
"pyparted==3.12.0",
"simple-term-menu==1.5.0",
]
Comment on lines +22 to +25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we update the PR to only include this change, after merging upstream master into this PR branch, I think we're good to merge this.

I've replaced flit and the build process in #1655


[project.urls]
Home = "https://archlinux.org"
Expand Down
39 changes: 0 additions & 39 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.