Skip to content

Commit e7dccb0

Browse files
Merge pull request #13 from btclib-org/setuptools_pyproject
Setuptools pyproject
2 parents b086279 + bc6c329 commit e7dccb0

File tree

11 files changed

+59
-70
lines changed

11 files changed

+59
-70
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: build
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
branches:
9-
- master
3+
on: [push, pull_request]
104

115
jobs:
126
build-linux:

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
workflow_run:
55
workflows:
66
- build
7-
branches:
8-
- master
97
types:
108
- completed
119

@@ -48,4 +46,4 @@ jobs:
4846
run: python -m pip install --verbose --find-links dist/ btclib_libsecp256k1
4947

5048
- name: Test
51-
run: python test.py
49+
run: python scripts/test.py

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
# - id: name-tests-test
2929
- id: check-toml
3030
- repo: https://github.com/DavidAnson/markdownlint-cli2
31-
rev: v0.6.0
31+
rev: v0.7.1
3232
hooks:
3333
- id: markdownlint-cli2-fix
3434
name: markdownlint-cli2-fix (in place fixes)
@@ -39,13 +39,13 @@ repos:
3939
args: [--notice=COPYRIGHT]
4040
files: python
4141
- repo: https://github.com/asottile/pyupgrade
42-
rev: v3.3.1
42+
rev: v3.4.0
4343
hooks:
4444
- id: pyupgrade
4545
args: [--py37-plus]
4646
# exclude: *fixtures
4747
- repo: https://github.com/PyCQA/autoflake
48-
rev: v2.0.0
48+
rev: v2.1.1
4949
hooks:
5050
- id: autoflake
5151
args:
@@ -57,7 +57,7 @@ repos:
5757
- --remove-unused-variables
5858
- --remove-rhs-for-unused-variables
5959
- repo: https://github.com/pycqa/isort
60-
rev: 5.11.4
60+
rev: 5.12.0
6161
hooks:
6262
- id: isort
6363
name: isort (black profile, in place fixes)
@@ -71,7 +71,7 @@ repos:
7171
hooks:
7272
- id: yesqa
7373
- repo: https://github.com/psf/black
74-
rev: 22.12.0
74+
rev: 23.3.0
7575
hooks:
7676
- id: black
7777
name: black (in place fixes)
@@ -86,16 +86,16 @@ repos:
8686
hooks:
8787
- id: flake8
8888
- repo: https://github.com/PyCQA/bandit
89-
rev: 1.7.4
89+
rev: 1.7.5
9090
hooks:
9191
- id: bandit
9292
# disable B101 (Test for use of assert)
9393
args: ["-s", "B101"]
9494
- repo: https://github.com/pre-commit/mirrors-mypy
95-
rev: v0.991
95+
rev: v1.3.0
9696
hooks:
9797
- id: mypy
9898
- repo: https://github.com/regebro/pyroma
99-
rev: "4.1"
99+
rev: "4.2"
100100
hooks:
101101
- id: pyroma

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
include btclib_libsecp256k1/libsecp256k1.*
2-
include build.py
32
recursive-include secp256k1 *
3+
recursive-include scripts *

pyproject.toml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
1+
[project]
2+
name="btclib_libsecp256k1"
3+
version="0.2.1"
4+
description="Simple python bindings to libsecp256k1"
5+
readme = "README.md"
6+
license = {text = "MIT"}
7+
requires-python = ">=3.7"
8+
authors = [
9+
{name = "Giacomo Caironi", email = "giacomo.caironi@gmail.com"},
10+
]
11+
keywords=["bitcoin", "libsecp256k1"]
12+
classifiers=[
13+
"Programming Language :: Python :: 3 :: Only",
14+
"Programming Language :: Python :: 3.7",
15+
"Programming Language :: Python :: 3.8",
16+
"Programming Language :: Python :: 3.9",
17+
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
20+
"Development Status :: 4 - Beta",
21+
"Intended Audience :: Developers",
22+
"Intended Audience :: Education",
23+
"License :: OSI Approved :: MIT License",
24+
"Natural Language :: English",
25+
"Operating System :: OS Independent",
26+
"Topic :: Security :: Cryptography",
27+
"Topic :: Scientific/Engineering",
28+
"Topic :: Software Development :: Libraries :: Python Modules",
29+
]
30+
dependencies = ['cffi>=1.0.0']
31+
32+
[tool.setuptools.packages.find]
33+
include = ['btclib_libsecp256k1*']
34+
35+
[project.urls]
36+
homepage = "https://btclib.org"
37+
documentation = "https://btclib.readthedocs.io/"
38+
repository = "https://github.com/btclib-org/btclib_libsecp256k1"
39+
download = "https://github.com/btclib-org/btclib_libsecp256k1/releases"
40+
changelog = "https://github.com/btclib-org/btclib_libsecp256k1/HISTORY.md"
41+
issues = "https://github.com/btclib-org/btclib_libsecp256k1/issues"
42+
pull_requests = "https://github.com/btclib-org/btclib_libsecp256k1/pulls"
43+
144
[build-system]
2-
requires = ['setuptools', 'wheel', 'cffi>=1.0.0']
45+
requires = ['setuptools', 'cffi>=1.0.0']
46+
build-backend = "setuptools.build_meta"
347

448
[tool.mypy]
549
strict = false

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# packages required to develop, build, and test
2-
32
black
43
check-manifest
54

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

build.py renamed to scripts/cffi_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
windows = "--plat-name=win_amd64" in sys.argv or platform.system() == "Windows"
2525
static = bool(not windows and pathlib.Path(".git").exists())
2626
static = static and os.environ.get("BTCLIB_LIBSECP256K1_DYNAMIC", "false") != "true"
27-
secp256k1_dir = pathlib.Path(__file__).parent.resolve() / "secp256k1"
27+
secp256k1_dir = pathlib.Path(__file__).parent.parent.resolve() / "secp256k1"
2828
libs_dir = secp256k1_dir / ".libs"
2929
include_dir = secp256k1_dir / "include"
3030
filename = "_btclib_libsecp256k1"
File renamed without changes.

0 commit comments

Comments
 (0)