-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Experiment: use Python scripting for CI
- Loading branch information
Showing
5 changed files
with
55 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
cffi >= 1.14.5 | ||
setuptools >= 49.5.0 | ||
wheel >= 0.30.0 | ||
# Beyond "build" requirements | ||
wheel >= 0.28.0 | ||
|
||
# Beyond nominal "build" requirements | ||
build >= 0.6.0 | ||
twine >= 1.15.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
from pathlib import Path | ||
import subprocess | ||
import sys | ||
|
||
CIBW_VER = os.environ.get('_CIBW_VER', '2.16.3') | ||
|
||
if sys.argv[1] == 'install': | ||
subprocess.check_call([ | ||
sys.executable, '-m', 'pip', | ||
'install', f'cibuildwheel == {CIBW_VER}' | ||
]) | ||
|
||
elif sys.argv[1] == 'build': | ||
target = Path(sys.argv[2]) | ||
subprocess.check_call([ | ||
sys.executable, '-m', 'cibuildwheel', | ||
*target.glob('*'), | ||
'--output-dir', target | ||
]) | ||
|
||
else: | ||
raise RuntimeError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env python3 | ||
from pathlib import Path | ||
import subprocess | ||
import sys | ||
|
||
subprocess.check_call([ | ||
sys.executable, '-m', 'build', | ||
'--sdist' | ||
)] | ||
|
||
subprocess.check_call([ | ||
sys.executable, '-m', 'twine', | ||
'check', *Path('dist').glob('*') | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python3 | ||
from pathlib import Path | ||
import subprocess | ||
import sys | ||
|
||
subprocess.check_call([ | ||
sys.executable, '-m', 'pip', | ||
'install', | ||
'-r', Path(__file__).parent / '..' / 'requirements-dev.txt' | ||
]) |