-
-
Notifications
You must be signed in to change notification settings - Fork 365
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 a python requirement with an --extra-index-url argument #1270
Comments
Agreed that this is something we should formally support. In addition to the PIP_EXTRA_INDEX_URL workaround, you could download the wheel manually, and add a direct reference to the wheel in your requires list. Another workaround - although one that is a lot more fragile, and I wouldn't really want to rely on long term - would be to add [ |
Thank you for your responses. I tried adding |
To add to the fragility of this workaround, you can't have the space separating the option and its value...an equal sign must be used. This should be true for any requires = [
"--extra-index-url=https://download.pytorch.org/whl/cpu",
"torch==2.0.1",
"toga-gtk~=0.3.1",
] |
New here, but I just got through the tutorial and I'm looking to contribute. Wanted some clarity about what the most desirable solution would be:
|
The most flexible way would be to allow arbitrary pip options, like Chaquopy does. @freakboy3742 @rmartin16: any thoughts? |
That's definitely an option; my primary hesitation is the possibility that at some point in the future, we might provide an install option other than pip (the most likely alternative being Conda; but in theory, there could be others), as well as (potentially) lock file formats that are bound to specific tools (e.g., poetry). Baking pip options directly into the config could back us into a corner, whereas "repository url" and/or "extra repository URL" is less likely to be a problem. |
@freakboy3742, how about I then add |
Sounds like a good approach to me; with the caveat that the extra needs to be a list, not just a single URL (since you can specify multiple extra URLs) |
It would be fantastic if we could simply opt to disable briefcases package resolution and use an existing system like setup tools (boring tech FTW). from setuptools import setup
setup(
name='somepackage',
install_requires=[
'somedep'
],
dependency_links=[
'https://pypi.example.org/pypi/somedep/'
]
# ...
) pip install .
briefcase dev I mean why re-invent the whl;) |
@rfletchr Briefcase will honor PEP621 metadata (now formally documented here). That means Beyond that, setuptools doesn't have sufficient flexibility to define the packaging needs of a bundled Python app, so it's not possible to fully specify a Briefcase configuration purely with setuptools. |
Adding to the feature list - we probably also want to support |
This comment was marked as off-topic.
This comment was marked as off-topic.
@Koffilo, please open a discussion if you have a question about BeeWare. Also please stop posting other questions in existing issues. |
What is the problem or limitation you are having?
Hi, I have a project which requires PyTorch CPU version, not the default GPU version. Normally, it's possible to install this in one of two ways using pip:
or
where the requirements look like:
Describe the solution you'd like
How do I translate this to the Briefcase environment? This is a question rather than a solution, but I'm new to Beeware and don't see any obvious way of including
--extra-index-url
in therequires
section of thepyproject.toml
file.Describe alternatives you've considered
Thanks!
Additional context
No response
The text was updated successfully, but these errors were encountered: