Skip to content

Commit e8a4553

Browse files
committed
Initial import of elfdeps
Signed-off-by: Christian Heimes <christian@python.org>
0 parents  commit e8a4553

File tree

11 files changed

+1002
-0
lines changed

11 files changed

+1002
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
---
3+
name: CI
4+
5+
on:
6+
- push
7+
- pull_request
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
name: "${{ matrix.python }} on ${{ matrix.platform }}"
15+
runs-on: "${{ matrix.platform }}"
16+
strategy:
17+
matrix:
18+
python:
19+
- "3.9"
20+
- "3.10"
21+
- "3.11"
22+
- "3.12"
23+
platform:
24+
- "ubuntu-latest"
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{ matrix.python }}
35+
cache: pip
36+
cache-dependency-path: |
37+
**/pyproject.toml
38+
**/tox.ini
39+
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
python -m pip install tox tox-gh>=1.2
44+
45+
- name: Run
46+
run: tox
47+
48+
ruff:
49+
name: "Ruff ${{ matrix.python }} on ${{ matrix.platform }}"
50+
runs-on: "${{ matrix.platform }}"
51+
strategy:
52+
matrix:
53+
python:
54+
- "3.12"
55+
platform:
56+
- "ubuntu-latest"
57+
58+
steps:
59+
- uses: actions/checkout@v4
60+
with:
61+
fetch-depth: 0
62+
63+
- name: Set up Python
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: ${{ matrix.python }}
67+
cache: pip
68+
cache-dependency-path: |
69+
**/pyproject.toml
70+
**/tox.ini
71+
72+
- name: Install dependencies
73+
run: |
74+
python -m pip install --upgrade pip
75+
python -m pip install tox
76+
77+
- name: Run
78+
run: tox -e lint

.github/workflows/pypi.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
---
3+
4+
name: Build, test, and upload PyPI package
5+
6+
on:
7+
- push
8+
- pull_request
9+
- release
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build-package:
16+
name: Build and check packages
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: hynek/build-and-inspect-python-package@v2
22+
23+
# push to Test PyPI on
24+
# - a new GitHub release is published
25+
# - a PR is merged into main branch
26+
publish-test-pypi:
27+
name: Publish packages to test.pypi.org
28+
# environment: publish-test-pypi
29+
if: |
30+
github.repository_owner == 'tiran' && (
31+
github.event.action == 'published' ||
32+
(github.event_name == 'push' && github.ref == 'refs/heads/main')
33+
)
34+
permissions:
35+
contents: read
36+
# see https://docs.pypi.org/trusted-publishers/
37+
id-token: write
38+
runs-on: ubuntu-latest
39+
needs: build-package
40+
41+
steps:
42+
- name: Fetch build artifacts
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: Packages
46+
path: dist
47+
48+
- name: Upload to Test PyPI
49+
uses: pypa/gh-action-pypi-publish@release/v1
50+
with:
51+
repository-url: https://test.pypi.org/legacy/
52+
53+
# push to Production PyPI on
54+
# - a new GitHub release is published
55+
publish-pypi:
56+
name: Publish release to pypi.org
57+
# environment: publish-pypi
58+
if: |
59+
github.repository_owner == 'tiran' && github.event.action == 'published'
60+
permissions:
61+
# see https://docs.pypi.org/trusted-publishers/
62+
id-token: write
63+
# allow gh release upload
64+
contents: write
65+
66+
runs-on: ubuntu-latest
67+
needs: build-package
68+
69+
steps:
70+
- name: Fetch build artifacts
71+
uses: actions/download-artifact@v4
72+
with:
73+
name: Packages
74+
path: dist
75+
76+
- uses: sigstore/gh-action-sigstore-python@v2.1.1
77+
with:
78+
inputs: >-
79+
./dist/*.tar.gz
80+
./dist/*.whl
81+
82+
- name: Upload artifacts and signatures to GitHub release
83+
env:
84+
GITHUB_TOKEN: ${{ github.token }}
85+
run: >-
86+
gh release upload '${{ github.ref_name }}' dist/* --repo '${{ github.repository }}'
87+
88+
# PyPI does not accept .sigstore artifacts and
89+
# gh-action-pypi-publish has no option to ignore them.
90+
- name: Remove sigstore signatures before uploading to PyPI
91+
run: rm ./dist/*.sigstore
92+
93+
- name: Upload to PyPI
94+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110+
.pdm.toml
111+
.pdm-python
112+
.pdm-build/
113+
114+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115+
__pypackages__/
116+
117+
# Celery stuff
118+
celerybeat-schedule
119+
celerybeat.pid
120+
121+
# SageMath parsed files
122+
*.sage.py
123+
124+
# Environments
125+
.env
126+
.venv
127+
env/
128+
venv/
129+
ENV/
130+
env.bak/
131+
venv.bak/
132+
133+
# Spyder project settings
134+
.spyderproject
135+
.spyproject
136+
137+
# Rope project settings
138+
.ropeproject
139+
140+
# mkdocs documentation
141+
/site
142+
143+
# mypy
144+
.mypy_cache/
145+
.dmypy.json
146+
dmypy.json
147+
148+
# Pyre type checker
149+
.pyre/
150+
151+
# pytype static type analyzer
152+
.pytype/
153+
154+
# Cython debug symbols
155+
cython_debug/
156+
157+
# PyCharm
158+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160+
# and can be added to the global gitignore or merged into this file. For a more nuclear
161+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162+
#.idea/

0 commit comments

Comments
 (0)