Skip to content

Commit

Permalink
Merge pull request easybuilders#10326 from Flamefire/fix_CVS_ECs_in_s…
Browse files Browse the repository at this point in the history
…dist

ensure that CVS easyconfigs are included in source tarball produced by 'python setup.py sdist'
  • Loading branch information
boegel authored Apr 12, 2020
2 parents 4dbb2db + 1ad052e commit 0ef40c9
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 7 deletions.
56 changes: 51 additions & 5 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: easyconfigs unit tests
on: [push, pull_request]
jobs:
build:
test-suite:
runs-on: ubuntu-18.04
strategy:
matrix:
Expand Down Expand Up @@ -114,18 +114,64 @@ jobs:
unset PYTHONPATH
# install easyconfigs via distribution package
python setup.py sdist
python setup.py sdist > /dev/null
ls dist
pip install dist/easybuild-easyconfigs*tar.gz
pip install dist/easybuild-easyconfigs*tar.gz > /dev/null
# robot-paths value should not be empty, but have an entry that includes easybuild/easyconfigs subdir
echo "eb --show-config"
eb --show-config | tee eb_show_config.out
grep "^robot-paths .*/easybuild/easyconfigs" eb_show_config.out
# check whether some specific easyconfig files are found
echo "eb --search 'TensorFlow-1.14.*.eb'"
eb --search 'TensorFlow-1.14.*.eb' | tee eb_search_TF.out
grep '/TensorFlow-1.14.0-foss-2019a-Python-3.7.2.eb$' eb_search_TF.out
eb --search '^foss-2018b.eb' | tee eb_search_foss.out
grep '/foss-2018b.eb$' eb_search_foss.out
echo "eb --search '^foss-2019b.eb'"
eb --search '^foss-2019b.eb' | tee eb_search_foss.out
grep '/foss-2019b.eb$' eb_search_foss.out
# make sure CVS easyconfigs are included in installation (cfr. issue #10325)
echo "Searching for CVS easyconfigs..."
eb --search '^CVS-' | grep '/CVS-'
# try installing M4 with system toolchain (requires ConfigureMake easyblock + easyconfig)
eb --prefix /tmp/$USER/$GITHUB_SHA M4-1.4.18.eb
test-sdist:
runs-on: ubuntu-18.04
strategy:
matrix:
python: [2.7, 3.6, 3.7]
steps:
- uses: actions/checkout@v2

- name: set up Python
uses: actions/setup-python@v1

- name: Create source distribution
run: python setup.py sdist

- name: Inspect files included in source distribution
working-directory: dist
run: |
tar xfz easybuild-easyconfigs*tar.gz
cd easybuild-easyconfigs-*/
# .git folder should not be there in source tarball
dot_git_files=$(find . -name .git)
if [ -n "$dot_git_files" ]; then
echo "Found .git folders in source tarball: $dot_git_files" && false
else
echo "No .git folders found in source tarball: OK"
fi
# CVS easyconfigs must be included in source tarball,
# see https://github.com/easybuilders/easybuild-easyconfigs/issues/10325
cvs_easyconfigs=$(find . -name 'CVS-*.eb')
if [ -z "$cvs_easyconfigs" ]; then
echo "CVS easyconfigs not found" && false
else
echo "Found CVS easyconfigs: $cvs_easyconfigs"
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dist/
*.swp
*.ropeproject/
eb-*.log
/MANIFEST
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
recursive-include easybuild *
include CONTRIBUTING.md
include LICENSE
include README.rst
include RELEASE_NOTES
include setup.py
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@

# never install as a zipped egg, since then easyconfig file can't be found
zip_ok = 0

[sdist]
# Don't remove CVS and RCS directories
prune = 0

0 comments on commit 0ef40c9

Please sign in to comment.