Skip to content

Latest commit

 

History

History
102 lines (70 loc) · 2 KB

DEVNOTE.md

File metadata and controls

102 lines (70 loc) · 2 KB

Development Guide

Init Project

  1. poetry

    here are poetry commands alias for my personal use:

    po: poetry
    por: poetry run
    pox: poetry run python
    # make venv
    po install --no-root
  2. python standalone version

    download from python standalone releases: https://github.com/indygreg/python-build-standalone/releases

    currently we choose 3.12 version.

    more details to see python/README.zh.md.

  3. a self pypi folder

    # download packages
    pox build/init.py download-requirements
    
    # build pypi index
    pox build/init.py rebuild-pypi-index
  4. make site-packages folder

    pox build/init.py make-site-packages --remove-exists

Run Depsland GUI

pox -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>

Lock Requirements

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>
# po install --no-root
pox poxtry_extensions/poetry_export.py <depsland_project>

it generates/updates <depsland_project>/requirements.lock file, which is used for build/init.py:download_requirements.

Build Depsland As Standalone Application

Build An Offline Version

...

Build An Internet Version

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'
pox build/build.py full-build ailyun -p blank