File tree Expand file tree Collapse file tree 6 files changed +29
-25
lines changed
Expand file tree Collapse file tree 6 files changed +29
-25
lines changed Original file line number Diff line number Diff line change 88 - uses : actions/setup-python@v5
99 with :
1010 python-version : ' 3.13'
11- - name : Install dependencies
11+ - name : Install tox
1212 run : |
13- python3 -m pip install --upgrade pip setuptools
14- python3 -m pip install --upgrade build twine
13+ python3 -m pip install 'tox>=1.8.0'
1514 - name : Create and check sdist and wheel packages
16- run : |
17- python3 -m build
18- twine check dist/*
15+ run : tox -e build
1916 - name : Publish to PyPI
2017 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'galaxyproject'
2118 uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ jobs:
128128 - name : Install tox
129129 run : |
130130 python3 -m pip install --upgrade pip setuptools
131- python3 -m pip install 'tox>=1.8.0' 'virtualenv>=20.0.14'
131+ python3 -m pip install 'tox>=1.8.0'
132132 - name : Set up Python for Galaxy
133133 uses : actions/setup-python@v5
134134 with :
Original file line number Diff line number Diff line change 4141# compiled docs
4242docs /_build
4343
44- # Python virtualenv
44+ # Python virtual environment
4545.venv
Original file line number Diff line number Diff line change 77
88clean :
99 rm -rf bioblend.egg-info/ build/ dist/
10+ find . -type d -name ' .mypy_cache' -exec rm -rf {} +
1011 make -C docs/ clean
1112
1213venv :
1314 # Create and activate a virtual environment
14- [ -f .venv/bin/activate ] || virtualenv -p python3 .venv
15- ( $( IN_VENV) && \
16- # Install latest versions of pip and setuptools \
17- python3 -m pip install --upgrade pip setuptools && \
18- # Install latest versions of other needed packages in the virtualenv \
19- python3 -m pip install --upgrade twine wheel \
20- )
21-
22- release : clean venv
23- ( $( IN_VENV) && \
24- # Create files in dist/ \
25- python3 setup.py sdist bdist_wheel && \
26- twine check dist/* && \
27- twine upload dist/*
15+ [ -f .venv/bin/activate ] || python3 -m venv .venv || virtualenv -p python3 .venv
16+ # Install latest versions of pip and setuptools
17+ ( $( IN_VENV) \
18+ && python3 -m pip install --upgrade pip setuptools \
2819 )
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ BIOBLEND_DIR=$(get_abs_dirname "$(dirname "$0")")
6262if ! command -v tox > /dev/null; then
6363 cd " ${BIOBLEND_DIR} "
6464 if [ ! -d .venv ]; then
65- virtualenv -p python3 .venv
65+ python3 -m venv .venv
6666 fi
6767 . .venv/bin/activate
6868 python3 -m pip install --upgrade " tox>=1.8.0"
8888 esac
8989fi
9090
91- # Setup Galaxy virtualenv
91+ # Setup Galaxy virtual environment
9292if [ -n " ${GALAXY_PYTHON} " ]; then
9393 if [ ! -d .venv ]; then
94- virtualenv -p " ${GALAXY_PYTHON} " .venv
94+ if ! " ${GALAXY_PYTHON} " -m venv .venv; then
95+ echo " Creating the Python virtual environment for Galaxy using the venv standard library module failed."
96+ echo " Trying with virtualenv now."
97+ virtualenv -p " $GALAXY_PYTHON " .venv
98+ fi
9599 fi
96100 export GALAXY_PYTHON
97101fi
Original file line number Diff line number Diff line change @@ -15,6 +15,18 @@ passenv =
1515 GALAXY_VERSION
1616 BIOBLEND_TOOLSHED_URL
1717
18+ [testenv:build]
19+ commands =
20+ make clean
21+ python3 -m build
22+ twine check dist/*
23+ deps =
24+ build
25+ twine
26+ allowlist_externals =
27+ make
28+ skip_install = true
29+
1830[testenv:lint]
1931commands =
2032 ruff check .
You can’t perform that action at this time.
0 commit comments