Skip to content

Commit 3537416

Browse files
Merge remote-tracking branch 'skeleton/main' into support-named-pyprojects
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
2 parents d3986b7 + ae254b3 commit 3537416

8 files changed

Lines changed: 392 additions & 27 deletions

File tree

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore all Git auto CR/LF line endings conversions
2+
* -text
3+
pyproject.toml export-subst

.github/workflows/pypi-release.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Create library release archives, create a GH release and publish PyPI wheel and sdist on tag in main branch
2+
3+
4+
# This is executed automatically on a tag in the main branch
5+
6+
# Summary of the steps:
7+
# - build wheels and sdist
8+
# - upload wheels and sdist to PyPI
9+
# - create gh-release and upload wheels and dists there
10+
# TODO: smoke test wheels and sdist
11+
# TODO: add changelog to release text body
12+
13+
# WARNING: this is designed only for packages building as pure Python wheels
14+
15+
on:
16+
workflow_dispatch:
17+
push:
18+
tags:
19+
- "v*.*.*"
20+
21+
jobs:
22+
build-pypi-distribs:
23+
name: Build and publish library to PyPI
24+
runs-on: ubuntu-24.04
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: 3.12
32+
33+
- name: Install pypa/build and twine
34+
run: python -m pip install --user --upgrade build twine pkginfo flot
35+
36+
- name: Build a binary wheel and a source tarball
37+
run: python -m flot --pyproject pyproject.toml --wheel --sdist
38+
39+
- name: Validate wheel and sdis for Pypi
40+
run: python -m twine check dist/*
41+
42+
- name: Upload built archives
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: pypi_archives
46+
path: dist/*
47+
48+
49+
create-gh-release:
50+
name: Create GH release
51+
needs:
52+
- build-pypi-distribs
53+
runs-on: ubuntu-24.04
54+
55+
steps:
56+
- name: Download built archives
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: pypi_archives
60+
path: dist
61+
62+
- name: Create GH release
63+
uses: softprops/action-gh-release@v2
64+
with:
65+
draft: true
66+
files: dist/*
67+
68+
69+
create-pypi-release:
70+
name: Create PyPI release
71+
needs:
72+
- create-gh-release
73+
runs-on: ubuntu-24.04
74+
environment: pypi-publish
75+
permissions:
76+
id-token: write
77+
78+
steps:
79+
- name: Download built archives
80+
uses: actions/download-artifact@v4
81+
with:
82+
name: pypi_archives
83+
path: dist
84+
85+
- name: Publish to PyPI
86+
if: startsWith(github.ref, 'refs/tags')
87+
uses: pypa/gh-action-pypi-publish@release/v1
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI Tests and Documentation
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-24.04
8+
9+
strategy:
10+
max-parallel: 4
11+
matrix:
12+
python-version: [3.13]
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install Dependencies
24+
run: make dev
25+
26+
- name: Check documentation build
27+
run: make docs
28+
29+
- name: Check code, docs style and run tests
30+
run: make test

.gitignore

Lines changed: 76 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,76 @@
1-
/build/
2-
/dist/
3-
__pycache__/
4-
/docs/_build/
5-
/.coverage
6-
/.pytest_cache
7-
/.tox
8-
.idea/
9-
venv/
10-
*.pyc
11-
.python-version
1+
# Python compiled files
2+
*.py[cod]
3+
4+
# virtualenv and other misc bits
5+
/src/*.egg-info
6+
*.egg-info
7+
/dist
8+
/build
9+
/bin
10+
/lib
11+
/scripts
12+
/Scripts
13+
/Lib
14+
/pip-selfcheck.json
15+
/tmp
16+
/venv
17+
.Python
18+
/include
19+
/Include
20+
/local
21+
*/local/*
22+
/local/
23+
/share/
24+
/tcl/
25+
/.eggs/
26+
27+
# Installer logs
28+
pip-log.txt
29+
30+
# Unit test / coverage reports
31+
.cache
32+
.coverage
33+
.coverage.*
34+
nosetests.xml
35+
htmlcov
36+
37+
# Translations
38+
*.mo
39+
40+
# IDEs
41+
.project
42+
.pydevproject
43+
.idea
44+
org.eclipse.core.resources.prefs
45+
.vscode
46+
.vs
47+
48+
# Sphinx
49+
docs/_build
50+
docs/bin
51+
docs/build
52+
docs/include
53+
docs/Lib
54+
doc/pyvenv.cfg
55+
pyvenv.cfg
56+
57+
# Various junk and temp files
58+
.DS_Store
59+
*~
60+
.*.sw[po]
61+
.build
62+
.ve
63+
*.bak
64+
/.cache/
65+
66+
# pyenv
67+
/.python-version
68+
/man/
69+
/.pytest_cache/
70+
lib64
71+
tcl
72+
73+
# Ignore Jupyter Notebook related temp files
74+
.ipynb_checkpoints/
75+
/.ruff_cache/
76+
.env

.readthedocs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build in latest ubuntu/python
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.13"
13+
14+
# Build PDF & ePub
15+
formats:
16+
- epub
17+
- pdf
18+
19+
# Where the Sphinx conf.py file is located
20+
sphinx:
21+
configuration: docs/source/conf.py
22+
23+
# Setting the python version and doc build requirements
24+
python:
25+
install:
26+
- method: pip
27+
path: .
28+
extra_requirements:
29+
- dev

CHANGELOG.rst

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,49 @@
1-
Changelog
2-
=========
1+
CHANGELOG
2+
===============
33

4-
Next Release
5-
----------------
4+
v0.7.3
5+
-------
66

7+
- Support named pyproject.toml files properly so multiple
8+
wheels can be created from specific pyproject.toml files
9+
- Add standard CI tests, style and doc checks, release scripts
710

8-
v0.7.2 - 2023-12-29
9-
v0.7.1 - 2023-12-26
10-
v0.6.2 - 2023-12-23
11-
v0.6.1 - 2023-12-23
12-
v0.6.0 - 2023-12-23
13-
----------------------
1411

15-
Initial releases based on a fork of flit.
12+
Version 0.7.2
13+
--------------
14+
15+
- Improve logging messages.
16+
- Do not double include files in sdist that are selected in includes, extra and metadata files.
17+
18+
19+
Version 0.7.1
20+
--------------
21+
22+
- Simplify how includes and excludes are processed.
23+
- Make builds reproducible.
24+
- Add support to run arbitrarry Python scripts at the start of a wheel or sdist build.
25+
- Improve documentation, including a release checklist.
26+
27+
28+
Version 0.6.2
29+
--------------
30+
31+
- First working version.
32+
33+
34+
Version 0.6.1
35+
--------------
36+
37+
- Improve documentation.
38+
39+
40+
Version 0.6.0
41+
--------------
42+
43+
- Work in progress.
44+
45+
46+
Version 0.5
47+
-----------
48+
49+
- Initial release forked from flit.

docs/_static/theme_overrides.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* this is the container for the pages */
2+
.wy-nav-content {
3+
max-width: 100%;
4+
padding: 0px 40px 0px 0px;
5+
margin-top: 0px;
6+
}
7+
8+
.wy-nav-content-wrap {
9+
border-right: solid 1px;
10+
}
11+
12+
div.rst-content {
13+
max-width: 1300px;
14+
border: 0;
15+
padding: 10px 80px 10px 80px;
16+
margin-left: 50px;
17+
}
18+
19+
@media (max-width: 768px) {
20+
div.rst-content {
21+
max-width: 1300px;
22+
border: 0;
23+
padding: 0px 10px 10px 10px;
24+
margin-left: 0px;
25+
}
26+
}

0 commit comments

Comments
 (0)