-
Notifications
You must be signed in to change notification settings - Fork 122
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
--extra-index-url #651
Comments
You do not need such a flag. I build python code with locally deployed dependencies. The trick is to having correct configurations globally. For instance, in the [distutils]
index-servers =
local
[local]
repository = http://127.0.0.1:3141/root/local/ This is kind of the default setup you'd get with a locally installed Adapt to your specific personal needs. |
As a workaround, it should be possible to install (into a virtual environment) the private-indexed dependency first, and then run i.e., this might work: python3.X -m virtualenv venv
source venv/bin/activate
pip install cmake dependencyA dependencyB # and so on
pip install private_dependency --extra-index-url "https://path.to.your/pvt/index/"
pip install build
python -m build --sdist --no-isolation --outdir PATH you might need to make adjustments if you have a custom P.S. It looks like PDM and Poetry directly support adding extra index URLs in P.P.S. I tested this locally with the nightly wheels for SciPy: This is what I modified my build-system table to look like: [build-system]
requires = [
"setuptools>=64",
"pooch",
"tqdm",
"wheel==0.42.0",
"scipy==1.13.0.dev0",
] and these commands pip install "setuptools>=64" pooch tqdm "wheel==0.42.0"
pip install "scipy==1.13.0.dev0" --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
pip install build
python -m build --sdist --no-isolation work, as intended. Please note that I am suggesting the use of a virtual environment to counter the loss of an isolated build that you incur with the use of the |
Another workaround, setting the |
Is it possible to build source distributions that depend on at least one package, which is not in public PyPI?
For example, I have a requirements.txt
When I'm doing
python -m build --sdist
I getI tried to set pip-args in envs and pass it directly as
--extra-index-url=https://test.pypi.org/simple/ --trusted-host=https://test.pypi.org/simple/
but no resultIs there any way to do it?
The text was updated successfully, but these errors were encountered: