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

Install from source #165

Open
Forza-tng opened this issue Jun 8, 2023 · 7 comments
Open

Install from source #165

Forza-tng opened this issue Jun 8, 2023 · 7 comments
Labels
question Further information is requested

Comments

@Forza-tng
Copy link
Contributor

Hi,
Is there a way to install Pinnwand from sources rather than via pip? I'd like to be able to customise the html and css of my installation.

Thanks :)

@supakeen
Copy link
Owner

Sure, it should be; download the source tarball from pypi (or github on the releases)-page and then a pip install . in that directory.

@supakeen supakeen added the question Further information is requested label Jul 17, 2023
@Forza-tng
Copy link
Contributor Author

Forza-tng commented Nov 4, 2023

Thanks. This works. It's there a way to make it without pip? I am considering packaging Pinnwand on Alpine and we want to keep dependencies minimal.

The preferred way to install a python package is through python setup.py or via gpep517

Some examples are
https://gitlab.alpinelinux.org/forza/aports/-/blob/master/testing/yamkix/APKBUILD

https://gitlab.alpinelinux.org/forza/aports/-/blob/master/testing/sshuttle/APKBUILD

https://gitlab.alpinelinux.org/forza/aports/-/blob/master/testing/sqlmap/APKBUILD

@supakeen
Copy link
Owner

supakeen commented Nov 6, 2023

I think everything you'd need should be in the pyproject.toml but I readily admit I'm not the best at pep517. Let me direct a friendly Alpine developer into this issue to see what they think!

@Forza-tng
Copy link
Contributor Author

I tried to make an ebuild for Gentoo today, but ran out of steam when I realised i needed to make ebuilds for some of the dependencies as well :/...

So to solve my immediate issue with maintaining an up-to-date Pinnwand, I did a shell script that can create and update a dedicated pinnwand venv from github.

It's available at https://git.tnonline.net/Forza/misc/src/branch/main/pinnwand if anyone is interested.

@supakeen
Copy link
Owner

Which dependencies are missing in Gentoo?

@Forza-tng
Copy link
Contributor Author

Which dependencies are missing in Gentoo?

Looking in https://github.com/supakeen/pinnwand/blob/master/pyproject.toml we have the following missing dependencies.

From dependencies:

  • pygments-better-html
  • token-bucket
  • Possibly sqlalchemy-utc (dev-python/sqlalchemy exists)

From project.optional-dependencies:

  • pre-commit
  • pytest-playwright
  • pytest-html

The pdm-pep517 should be supported by Gentoo, though i haven't been able to fully test building Pinnwand due to missing deps.
https://projects.gentoo.org/python/guide/

@supakeen
Copy link
Owner

Right, you don't need the optional dependencies unless you want to run the full test suite(s) in your packaging pipeline. Generally you can get away with just an import-test (at least that's what's allowed on Fedora).

  1. token-bucket, would need actual packaging but it's quite straightforward (I maintain the package in Fedora).
  2. sqlalchemy-utc is a very recent addition, if this causes packagers woes (cc @NeilHanlon) then I can probably vendor it, as it's super small.
  3. pygments-better-html is also small enough to vendor but I don't want to take away the credits for the solution from @Kwpolska :)

As for pdm, I'm as always dissatisfied with the state of package management in Python so I'll gladly take guidance to just switch to setuptools's build system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants