-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check that the python packages versions match the conda version
- Loading branch information
1 parent
dbc0c46
commit 82ebdae
Showing
4 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
# Fix Python package version | ||
$PYTHON ${RECIPE_DIR}/replace.py -f setup.cfg --pre "name=gym-ignition" --post "name=gym-ignition\nversion=$PKG_VERSION" | ||
$PYTHON ${RECIPE_DIR}/replace.py -f pyproject.toml --pre "[tool.setuptools_scm]" --post "" | ||
$PYTHON ${RECIPE_DIR}/replace.py -f pyproject.toml --pre 'local_scheme = "dirty-tag"' --post "" | ||
|
||
pip install --no-build-isolation --no-deps . |
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
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,17 @@ | ||
#!/usr/bin/env python3 | ||
import argparse | ||
import fileinput | ||
|
||
if __name__ == "__main__": | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("-f", "--file", type=str) | ||
parser.add_argument("--pre", type=str) | ||
parser.add_argument("--post", type=str) | ||
|
||
args = parser.parse_args() | ||
|
||
# This context redirects stdout to the file changing it in place | ||
with fileinput.FileInput(args.file, inplace=True, backup='.bak') as file: | ||
for line in file: | ||
print(line.replace(args.pre, args.post), end='') |