Skip to content

Commit

Permalink
Merge pull request #5 from nipreps/fix/build-tests
Browse files Browse the repository at this point in the history
FIX: Build tests are failing
  • Loading branch information
oesteban authored Mar 10, 2022
2 parents 44cf093 + a70db39 commit 4aa60fa
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 27 deletions.
26 changes: 12 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
command: |
python3 -m venv /tmp/buildenv
source /tmp/buildenv/bin/activate
python3 -m pip install "setuptools ~= 45.0" wheel "setuptools_scm[toml] >= 6.2" \
"pip>=21" twine docutils
python -m pip install -U "setuptools~=58.0" "setuptools_scm>=6.2" pip wheel twine docutils
python setup.py sdist bdist_wheel
twine check dist/mriqc_learn*
- store_artifacts:
Expand All @@ -28,12 +27,11 @@ jobs:
command: |
python3 -m venv /tmp/install_sdist
source /tmp/install_sdist/bin/activate
python3 -m pip install -U pip
python3 -m pip install "setuptools ~= 45.0"
THISVERSION=$( python3 setup.py --version )
python -m pip install -U pip "setuptools~=58.0" "setuptools_scm>=6.2"
THISVERSION=$( python setup.py --version )
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
python3 -m pip install dist/mriqc_learn*.tar.gz
INSTALLED_VERSION=$(python3 -c 'import mriqc_learn as ml; print(ml.__version__, end="")')
python -m pip install dist/mriqc-learn*.tar.gz
INSTALLED_VERSION=$(python -c 'import mriqc_learn as ml; print(ml.__version__, end="")')
echo "VERSION: \"${THISVERSION}\""
echo "INSTALLED: \"${INSTALLED_VERSION}\""
test "${INSTALLED_VERSION}" = "${THISVERSION}"
Expand All @@ -42,11 +40,11 @@ jobs:
command: |
python3 -m venv /tmp/install_wheel
source /tmp/install_wheel/bin/activate
python3 -m pip install "setuptools ~= 45.0" "pip>=10.0.1"
THISVERSION=$( python3 setup.py --version )
python -m pip install "setuptools~=58.0" "setuptools_scm>=6.2" wheel "pip>=10.0.1"
THISVERSION=$( python setup.py --version )
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
python3 -m pip install dist/mriqc_learn*.whl
INSTALLED_VERSION=$(python3 -c 'import mriqc_learn as ml; print(ml.__version__, end="")')
python -m pip install dist/mriqc_learn*.whl
INSTALLED_VERSION=$(python -c 'import mriqc_learn as ml; print(ml.__version__, end="")')
echo "VERSION: \"${THISVERSION}\""
echo "INSTALLED: \"${INSTALLED_VERSION}\""
test "${INSTALLED_VERSION}" = "${THISVERSION}"
Expand All @@ -63,9 +61,9 @@ jobs:
command: |
python3 -m venv /tmp/upload
source /tmp/upload/bin/activate
python3 -m pip install twine
python3 -m twine check dist/*
python3 -m twine upload dist/* --non-interactive
python -m pip install twine
python -m twine check dist/*
python -m twine upload dist/* --non-interactive
workflows:
version: 2
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
python -m venv /tmp/buildenv
source /tmp/buildenv/bin/activate
python -m pip install -U "setuptools<60" pip wheel twine docutils
python -m pip install -U "setuptools~=58.0" "setuptools_scm>=6.2" pip wheel twine docutils
# Interpolate version
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
Expand All @@ -41,19 +41,19 @@ jobs:
THISVERSION=${TAG:-$THISVERSION}
echo "Expected VERSION: \"${THISVERSION}\""
echo "THISVERSION=${THISVERSION}" >> ${GITHUB_ENV}
python setup.py sdist
python -m twine check dist/mriqc_learn*.tar.gz
python -m twine check dist/mriqc-learn-${THISVERSION}.tar.gz
python setup.py bdist_wheel
python -m twine check dist/mriqc_learn*.whl
python -m twine check dist/mriqc_learn-${THISVERSION}-py3-none-any.whl
- name: Install in confined environment [sdist]
run: |
python -m venv /tmp/install_sdist
source /tmp/install_sdist/bin/activate
python -m pip install --upgrade pip wheel
python -m pip install dist/mriqc_learn*.tar.gz
python -m pip install dist/mriqc-learn-${THISVERSION}.tar.gz
INSTALLED_VERSION=$(python -c 'import mriqc_learn; print(mriqc_learn.__version__, end="")')
echo "VERSION: \"${THISVERSION}\""
echo "INSTALLED: \"${INSTALLED_VERSION}\""
Expand All @@ -63,7 +63,7 @@ jobs:
python -m venv /tmp/install_wheel
source /tmp/install_wheel/bin/activate
python -m pip install --upgrade pip wheel
python -m pip install dist/mriqc_learn*.whl
python -m pip install dist/mriqc_learn-${THISVERSION}-py3-none-any.whl
INSTALLED_VERSION=$(python -c 'import mriqc_learn; print(mriqc_learn.__version__, end="")')
echo "INSTALLED: \"${INSTALLED_VERSION}\""
test "${INSTALLED_VERSION}" = "${THISVERSION}"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
requires = ["setuptools>=45, <58", "wheel", "setuptools_scm>=6.2"]

[tool.setuptools_scm]
write_to = "mriqc_learn/_version.py"
Expand Down
6 changes: 1 addition & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ classifiers =
Intended Audience :: Science/Research
Topic :: Scientific/Engineering :: Image Recognition
License :: OSI Approved :: Apache Software License
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -18,11 +19,6 @@ url = https://github.com/nipreps/mriqc-learn

[options]
python_requires = >=3.7
setup_requires =
setuptools >= 45.0
setuptools_scm >= 6.2
setuptools_scm_git_archive
toml
install_requires =
numpy >=1.20, <1.22; python_version<'3.8'
numpy ~=1.20; python_version>='3.8'
Expand Down

0 comments on commit 4aa60fa

Please sign in to comment.