-
install dependencies
cd <depsland> poetry env use <python_3.12> poetry install --no-root
-
python standalone version
download from python standalone releases: https://github.com/indygreg/python-build-standalone/releases
ps: help to get direct download link:
poetry run python build/init.py help-me-choose-python
currently we use python 3.12.
more details see
python/README.zh.md
. -
self pypi folder
if you have an old depsland project on another pc, you can copy its
<depsland>/pypi
folder and overwrite here.otherwise create empty indexes by command:
# init "pypi" folder poetry run python build/init.py init-pypi-blank pypi # build pypi index poetry run python build/init.py rebuild-pypi-index
-
make site-packages folder
# if poetry.lock is updated, run: poetry run python sidework/merge_external_venv_to_local_pypi.py . poetry run python build/init.py make-site-packages --remove-exists
-
setup external project "python-tree-shaking"
git clone <python_tree_shaking_project> cd python-tree-shaking poetry env use <python_3.12> poetry install --no-root cd <depsland_project> poetry run python -m lk_utils mklink <poetry_venv_site_packages> chore/venv poetry run python build/init.py make-minified-site-packages
if you are using pycharm as your IDE, mark the following folders excluded:
- apps
- chore
- dist
- oss
- pypi
- python
- temp
poetry run python -m depsland launch-gui
if app crashed on windows, should manually kill the process:
# find the process id
netstat -ano | find '2028'
# kill the process
taskkill /F /PID <pid>
first make sure poetry has synced poetry.lock
file.
use script from https://github.com/likianta/poetry-extensions to lock requirements:
git clone <poetry_extensions_repo>
cd <poetry_extensions_repo>
# poetry install --no-root
poetry run python poxtry_extensions/poetry_export.py <depsland_project>
it generates/updates <depsland_project>/requirements.lock
file, which is used
for build/init.py:download_requirements
.
...
first create a config file at tests/config/depsland.yaml
:
oss:
server: aliyun
config:
access_key: <your_access_key>
secret_key: <your_secret_key>
endpoint: oss-cn-shanghai.aliyuncs.com
bucket: <your_bucket>
you need to purchase an aliyun oss service to fill the config.
then run the following command:
# tell depsland to redirect config to custom path
$env.DEPSLAND_CONFIG_ROOT = 'tests/config'
poetry run python build/build.py full-build ailyun -p blank