Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch from setuppy to pyprojecttoml #214

Merged
merged 31 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
678d407
add devcontainer files
sjev May 5, 2024
8c9f84b
rename prompt
sjev May 5, 2024
a1b388a
rename setup
sjev May 5, 2024
98a65d9
add pyproject
sjev May 5, 2024
76bf98e
add build
sjev May 5, 2024
b6f049f
auto install dev reqs
sjev May 5, 2024
20c7d63
add devcontainer instructions
sjev May 5, 2024
6109b84
try to fix header
sjev May 5, 2024
4abf6d9
add note
sjev May 5, 2024
6e35e5b
remove header
sjev May 5, 2024
2a656a1
rewrite
sjev May 5, 2024
484f3fa
run pre-commit, add licenses
sjev May 5, 2024
4f5e987
remove setup.py
sjev May 5, 2024
435475b
pff.. rst is not md
sjev May 5, 2024
a3c162f
downgrade to 3.11
sjev May 6, 2024
55b687d
remove requirement files
sjev May 6, 2024
45f0804
move `build` dep to dev reqs
sjev May 6, 2024
2657494
change license
sjev May 6, 2024
c94b991
add dummy requirements.txt as workaround for keeping CI script working.
sjev May 6, 2024
41ed0d2
add dev requirements install (+ autoformat indent)
sjev May 6, 2024
7e31cb3
Revert "add dev requirements install (+ autoformat indent)"
sjev May 6, 2024
3a1f3b3
Revert "add dummy requirements.txt as workaround for keeping CI scrip…
sjev May 6, 2024
f3779b8
Revert "remove requirement files"
sjev May 6, 2024
4e4934f
move requirements to external txt files
sjev May 6, 2024
2899011
removed devcontainer
sjev May 31, 2024
ef128a6
remove devcontainer mention from contributing, change install dev req…
FoamyGuy Jun 1, 2024
c773c20
min version 3.9
FoamyGuy Jun 3, 2024
2abf755
change release action for pyproject.toml instead of setup.py
FoamyGuy Jun 3, 2024
23baaeb
configure auto version
FoamyGuy Jun 3, 2024
50561f5
fix release action condition
FoamyGuy Jun 3, 2024
524e552
fix release action
FoamyGuy Jun 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Translate Repo Name For Build Tools filename_prefix
id: repo-name
run: echo ::set-output name=repo-name::circup
- name: Set up Python 3.7
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.11
- name: Pip install Sphinx & pre-commit
run: |
pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2019 Nicholas Tollervey, written for Adafruit Industries

# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: 2021 James Carr
#
# SPDX-License-Identifier: MIT

name: Release Actions
Expand All @@ -14,26 +15,20 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Check For setup.py
id: need-pypi
run: |
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
filter: 'blob:none'
depth: 0
- name: Set up Python
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: '3.11'
- name: Install dependencies
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
env:
TWINE_USERNAME: ${{ secrets.pypi_username }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
python setup.py sdist
python -m build
twine upload dist/*
17 changes: 13 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,24 @@ Developer Setup

.. note::

Please try to use Python 3.6+ while developing CircUp. This is so we can
Please try to use Python 3.9+ while developing CircUp. This is so we can
use the
`Black code formatter <https://black.readthedocs.io/en/stable/index.html>`_
(which only works with Python 3.6+).
and so that we're supporting versions which still receive security updates.


Clone the repository and from the root of the project,
install the requirements::

pip install -e ".[dev]"

If you'd like you can setup a virtual environment and activate it.::

python3 -m venv .env
source .env/bin/activate

install the development requirements::

pip install -r optional_requirements.txt


Run the test suite::

Expand Down
51 changes: 51 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SPDX-FileCopyrightText: 2024 Jev Kuznetsov, ROX Automation
#
# SPDX-License-Identifier: MIT

[build-system]
requires = ["setuptools>=61.0", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "circup"
dynamic = ["version"]
description = "A tool to manage/update libraries on CircuitPython devices."
readme = "README.rst"
authors = [{ name = "Adafruit Industries", email = "circuitpython@adafruit.com" }]
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Education",
"Topic :: Software Development :: Embedded Systems",
"Topic :: System :: Software Distribution"
]
keywords = ["adafruit", "blinka", "circuitpython", "micropython", "libraries"]

requires-python = ">=3.9"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
optional-dependencies = {optional = {file = ["optional_requirements.txt"]}}

[tool.setuptools_scm]

[project.scripts]
circup = "circup:main"

[project.urls]
homepage = "https://github.com/adafruit/circup"

[tool.setuptools.packages.find]
where = ["."] # This tells setuptools to look in the project root directory
include = ["circup"] # This pattern includes your main package and any sub-packages within it
104 changes: 0 additions & 104 deletions setup.py

This file was deleted.

Loading