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

Provide a CLI #52

Closed
flying-sheep opened this issue May 9, 2021 · 13 comments
Closed

Provide a CLI #52

flying-sheep opened this issue May 9, 2021 · 13 comments
Labels
component: CLI Improvements or additions to CLI type: feature A self-contained enhancement or new feature

Comments

@flying-sheep
Copy link

flying-sheep commented May 9, 2021

As mentioned in #1 and the description, it would be useful to have a CLI. (Creating this so people can get notified)

My use case for this project is to replace the way Linux distribution packages are packaged. As Thomas said in https://github.com/pradyunsg/installer/issues/1#issuecomment-622970860, people currently use error prone command lines like this:

python -m pip install --root $RPM_BUILD_ROOT --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location pyproject-wheeldir/*.whl

Would be great to have a very simple command line that does exactly that: Given a

  • Python binary with version $pythonver,
  • $root directory, and
  • wheel file

it installs the

  • package and dist info to $root/usr/lib/python$pythonver/site-packages/,
  • headers to $root/usr/include/,
  • scripts to $root/usr/bin/, and
  • data to $root (I assume)
@FFY00

This comment has been minimized.

@flying-sheep

This comment has been minimized.

@pradyunsg

This comment has been minimized.

@pradyunsg pradyunsg changed the title Implement a CLI What would be the use cases for a CLI? May 11, 2021
@pradyunsg

This comment has been minimized.

@FFY00

This comment has been minimized.

@pradyunsg

This comment has been minimized.

@FFY00

This comment has been minimized.

@flying-sheep

This comment has been minimized.

@pradyunsg

This comment has been minimized.

@pradyunsg
Copy link
Member

I'm gonna move the whole conversation about destdir to #58, and hide all the comments related to it here as off-topic.

@pradyunsg pradyunsg added the type: feature A self-contained enhancement or new feature label May 15, 2021
@pradyunsg pradyunsg changed the title What would be the use cases for a CLI? Provide a CLI May 15, 2021
@FFY00
Copy link
Member

FFY00 commented May 20, 2021

One other desirable feature would be dependency checking. https://github.com/pypa/build provides a function for this, if you want to use it.

https://github.com/pypa/build/blob/9258bccd200bf02ff101abde5f8d39d0e88cc621/src/build/__init__.py#L84

@pradyunsg
Copy link
Member

This is done, with #94.

@flying-sheep
Copy link
Author

flying-sheep commented Jan 25, 2022

Yay! This is so beautiful. I couldn’t wait and made a git package to try it out: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-installer-git

An Arch PKGBUILD for a Python package can very soon look like:

pypiname=...
pkgname=python-$pypiname
pkgver=...
[…]
makedepends=(python-build python-installer)  # nothing more

build() {
	cd "$srcdir/$pypiname-$pkgver"
	python -m build -w
}

package() {
	cd "$srcdir/$pypiname-$pkgver"
	python -m installer -d "$pkgdir" "dist/$pypiname-$pkgver-py3-none-any.whl"
}

@pradyunsg pradyunsg added the component: CLI Improvements or additions to CLI label Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: CLI Improvements or additions to CLI type: feature A self-contained enhancement or new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants