File tree Expand file tree Collapse file tree 5 files changed +65
-2
lines changed
Expand file tree Collapse file tree 5 files changed +65
-2
lines changed Original file line number Diff line number Diff line change 1+ dist : focal
2+ arch :
3+ - amd64
4+ - arm64
5+ language : python
6+ services :
7+ - docker
8+ python :
9+ - ' 3.10'
10+ - ' 3.11'
11+
12+ install :
13+ - python -m pip install --upgrade pip
14+ - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile=minimal -y
15+ - export PATH=${TRAVIS_HOME}/.cargo/bin:$PATH
16+ - rustup update
17+ - python -m pip install --upgrade pip
18+ - cd python-bindings
19+ - pip install -r requirements.txt
20+ script :
21+ - ./build.sh
22+ before_deploy :
23+ - python3 -m pip install --upgrade build
24+ - pip install maturin
25+ - echo $'[pypi]\nusername = __token__\npassword = '$PYPI_TOKEN > ~/.pypirc
26+ deploy :
27+ - provider : script
28+ script : maturin publish
29+ on :
30+ repo : TheCacophonyProject/cptv-tools
31+ tags : true
32+ skip_cleanup : ' true'
Original file line number Diff line number Diff line change 55To build the module run ` ./build.sh ` , which will put a native module called ` ctpv_rs_python_bindings.so ` into
66the ` ./examples ` folder.
77Then in a python virtual environment with ` numpy ` installed, you can run ` python python-cptv-decoder.py ` from inside
8- the ` examples ` folder.
8+ the ` examples ` folder.
9+
10+ ## Release to pypi
11+
12+ Update ` pyproject.toml ` version identifier then create a release on github this will upload a new version to https://pypi.org/project/python-cptv
Original file line number Diff line number Diff line change 11cargo build --release
22# Put the native lib in the examples folder.
3- mv ../target/release/libcptv_rs_python_bindings.dylib ./examples/cptv_rs_python_bindings.so
3+ mv ../target/release/libcptv_rs_python_bindings.so ./examples/cptv_rs_python_bindings.so
Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [" maturin>=1.0,<2.0" ]
3+ build-backend = " maturin"
4+
5+ [tool .maturin ]
6+ # "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so)
7+ features = [" pyo3/extension-module" ]
8+
9+ [project ]
10+ name = " python-cptv"
11+ version = " 0.0.4"
12+ authors = [
13+ { name =" Jon Hardie" , email =" Jon@cacophony.org.nz" },
14+ { name = " Giampaolo Feraro" , email = " Giampaolo@Cacophony.org.nz" }
15+ ]
16+ description = " This is Python package provides for quick parsing Cacophony Project Thermal Video (CPTV) files. "
17+ readme = " README.md"
18+ requires-python = " >=3.8"
19+ classifiers = [
20+ " Programming Language :: Python :: 3" ,
21+ " License :: OSI Approved :: MIT License" ,
22+ " Operating System :: OS Independent" ,
23+ ]
24+ dependencies = [
25+ " numpy"
26+ ]
Original file line number Diff line number Diff line change 1+ numpy
You can’t perform that action at this time.
0 commit comments