Skip to content
Snippets Groups Projects
Commit cb3c05c2 authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Merge branch 'devpi' into 'master'

Install internal dependencies from Gitlab package index

See merge request !696
parents ebd549e9 6d365e89
No related branches found
No related tags found
1 merge request!696Install internal dependencies from Gitlab package index
......@@ -45,7 +45,7 @@ pytest:
only: [merge_requests]
script:
- export LANG=C # Hopefully detect anything relying on locale
- python3 -m pip install ".[test]"
- python3 -m pip install ".[test]" --index-url https://git.xfel.eu/api/v4/groups/501/-/packages/pypi/simple
- python3 -m pytest --color yes --verbose --cov=cal_tools --cov=xfel_calibrate --cov-report html:htmlcov --cov-report term
coverage: '/TOTAL.*? (\d+(?:\.\d+)?\%)$/'
artifacts:
......@@ -58,7 +58,7 @@ cython-editable-install-test:
stage: test
only: [merge_requests]
script:
- python3 -m pip install -e ".[test]"
- python3 -m pip install -e ".[test]" --index-url https://git.xfel.eu/api/v4/groups/501/-/packages/pypi/simple
- python3 -m pytest --color yes --verbose ./tests/test_cythonalgs.py
automated_test:
......@@ -76,7 +76,7 @@ automated_test:
- integration
script:
- export LANG=C # Hopefully detect anything relying on locale
- python3 -m pip install ".[test]"
- python3 -m pip install ".[test]" --index-url https://git.xfel.eu/api/v4/groups/501/-/packages/pypi/simple
- python3 -c "from cal_tools.restful_config import restful_config; print(restful_config.get('calcat')['base-api-url'])"
- echo "Running automated test. This can take sometime to finish depending on the test data."
- echo "Given variables are REFERENCE=$REFERENCE, OUTPUT=$OUTPUT, DETECTORS=$DETECTORS, CALIBRATION=$CALIBRATION"
......
......@@ -62,7 +62,7 @@ install_requires = [
"docutils==0.20.1",
"dynaconf==3.2.4",
"dynflatfield==1.1.0",
"env_cache==0.1",
"env_cache==0.2",
"extra_data==1.16.0",
"extra_geom==1.11.0",
"gitpython==3.1.42",
......@@ -108,13 +108,16 @@ install_requires = [
]
if "readthedocs.org" not in sys.executable:
# These are in our own internal index, install with:
# --index-url https://git.xfel.eu/api/v4/groups/501/-/packages/pypi/simple
install_requires += [
"iCalibrationDB @ git+ssh://git@git.xfel.eu:10022/detectors/cal_db_interactive.git@2.4.3", # noqa
"XFELDetectorAnalysis @ git+ssh://git@git.xfel.eu:10022/karaboDevices/pyDetLib.git@6749b1949d7ca4bc5fef69e1ad8407e247dff9e5", # noqa
"CalParrot @ git+ssh://git@git.xfel.eu:10022/calibration/calparrot.git@0.3", # noqa
"iCalibrationDB==2.4.3",
"XFELDetectorAnalysis==2.7.2", # aka pyDetLib
"CalParrot==0.3",
# iminuit 1.3.8 is compatible with Python 3.11, but there isn't a 3.11
# wheel on PyPI, and building directly from source doesn't work.
"iminuit @ https://git.xfel.eu/api/v4/projects/4538/packages/generic/iminuit/1.3.8/iminuit-1.3.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", # noqa
# We have built a wheel & uploaded it on Gitlab.
"iminuit==1.3.8",
]
setup(
......
......@@ -14,6 +14,10 @@ from .calibrate import (
JobChain, SlurmOptions, run_finalize, get_pycalib_version,
)
# Python package index, including our internal packages
INDEX_URL = "https://git.xfel.eu/api/v4/groups/501/-/packages/pypi/simple"
# This function is copied and modified from Python 3.8.10
# Copyright © 2001-2022 Python Software Foundation; All Rights Reserved
# Used under the PSF license - https://docs.python.org/3/license.html
......@@ -74,7 +78,7 @@ def get_python(args, py_version):
reqs = (args.from_dir / 'requirements.txt').read_text('utf-8')
reqs = munge_requirements(reqs)
env_mgr = EnvsManager(
Path(args.env_cache), PyenvEnvMaker()
Path(args.env_cache), PyenvEnvMaker(), index_url=INDEX_URL,
)
return env_mgr.get_env(py_version, reqs).resolve() / 'bin' / 'python'
elif args.python:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment