# Win
py -3.9 -m venv ./.venv
# *nix
python -m venv ./.venv
# Win
.\.venv\Scripts\activate
# *nix
source ./.venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
For developing depending project/module, dependency can be added into requirements.txt as:
python-commons @ file:///C:/sources/setmy.info/submodules/python-commons
"File" -> "Settings" -> Python Integrated Tools -> Default test runner: Unittest
Running tests have a problem: working directory has to be set for tests.
python -m unittest discover -s ./test/info/setmy
python -m unittest discover -s ./test/info/setmy -p it_*.py
behave
python -m unittest discover -s ./test/info/setmy && python -m unittest discover -s ./test/info/setmy -p it_*.py && behave
# Win
set NAME=smi_python_commons
set VERSION=0.3.3
# *nix
NAME=smi_python_commons
VERSION=0.3.3
# Win
python smi_python_commons/scm_version.py %NAME% %VERSION%
# *nix
python smi_python_commons/scm_version.py ${NAME} ${VERSION}
git add ./${NAME}/project.py
git commit -m "project.py updated"
git push
python setup.py sdist bdist_wheel
twine upload dist/*
git tag -a ${VERSION} -m "${VERSION}"
git push --tags
- Update version info
- Deploy
python setup.py sdist bdist_wheel && twine upload dist/*