Skip to content

Commit

Permalink
Merge pull request #733 from bitcraze/rik/build
Browse files Browse the repository at this point in the history
Modernize install (pyproject.toml) and updated dependencies, metadata, documentation, versioning
  • Loading branch information
ataffanel authored Nov 21, 2024
2 parents e6e66f1 + d0048ed commit 94a861f
Show file tree
Hide file tree
Showing 11 changed files with 123 additions and 384 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,22 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.12
- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: 3.12
python-version: 3.13

- name: Check build and install
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: |
python3 -m build
- name: Install package
run: |
pip install setuptools
python3 setup.py sdist
pip install dist/*.tar.gz
- run: docker pull bitcraze/builder
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ jobs:
deploy:

runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/cfclient
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -34,5 +41,4 @@ jobs:
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
username: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true
13 changes: 10 additions & 3 deletions .github/workflows/test-python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@ jobs:

runs-on: ubuntu-latest

environment:
name: pypi-test
url: https://pypi.org/p/cfclient
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -34,6 +42,5 @@ jobs:
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
username: __token__
password: ${{ secrets.PYPI_TEST_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
verbose: true
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build/*
cache
src/cfclient.egg-info/*
src/cfclient/third_party/*
version.json
version.py
log_param_doc.json

# PC client settings
Expand Down
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ include README.md
recursive-include src/cfclient/configs *.json
recursive-include src/cfclient/ui *.ui
recursive-include src/cfclient/resources *
include src/cfclient/version.json
include gitversion.py
include src/cfclient/version.py
5 changes: 5 additions & 0 deletions docs/installation/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ page_id: install

This project requires Python 3.10+.

To install on Python 3.13, build tools and Python development headers are required.

There are a few things to sort out on your machine before you can install the client. Please see the appropriate
section depending on your environment.

Expand Down Expand Up @@ -66,6 +68,9 @@ Install git from the [official git website](https://git-scm.com/). Make sure it
git --version
```

If you're using Python 3.13, you need to install [Visual Studio](https://visualstudio.microsoft.com/downloads/). During the installation process, you only need to select the Desktop Development with C++ workload in the Visual Studio Installer.


#### Install crazyradio drivers

To use Crazyradio you will have to [install the drivers](https://www.bitcraze.io/documentation/repository/crazyradio-firmware/master/building/usbwindows/)
Expand Down
245 changes: 0 additions & 245 deletions gitversion.py

This file was deleted.

Loading

0 comments on commit 94a861f

Please sign in to comment.