Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feat/add-cmake-ex…
Browse files Browse the repository at this point in the history
…tension

# Conflicts:
#	.github/scripts/build-windows-wheels.sh
#	setup.py
  • Loading branch information
MementoRC committed Mar 20, 2024
2 parents 2fa5438 + 5e46aca commit 5288cb8
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 61 deletions.
60 changes: 59 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,65 @@
[build-system]
requires = ["setuptools>=61", "cffi>=1.3.0", "requests"]
requires = ["setuptools>=61", "cffi>=1.3.0", "requests", "setuptools-scm", 'asn1crypto']
build-backend = "setuptools.build_meta"

[project]
name = "coincurve"
authors = [
{ name="Ofek Lev", email="oss@ofek.dev" },
]
description = "Cross-platform Python CFFI bindings for libsecp256k1"
keywords = ["secp256k1", "crypto", "elliptic curves", "bitcoin", "ethereum", "cryptocurrency"]
requires-python = ">=3.8"
dependencies = [
"asn1crypto",
"cffi>=1.3.0"
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries',
'Topic :: Security :: Cryptography',
]
dynamic = ['version', 'readme']

[project.optional-dependencies]
dev = [
"coverage",
"pytest",
"pytest-benchmark"
]

[project.urls]
Homepage = "https://github.com/ofek/coincurve"
Documentation = "https://ofek.dev/coincurve/"
Repository = "https://github.com/ofek/coincurve"
"Bug Tracker" = "https://github.com/ofek/coincurve/issues"

# --- setuptools ---
[tool.setuptools]
packages = ['coincurve']
package-dir = {'' = 'src'}
package-data = {'coincurve' = ['py.typed']}

[tool.setuptools.dynamic]
version = {attr = "coincurve._version.__version__"}
readme = {content-type = "text/markdown", file = "README.md"}

# --- hatch ---

[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
Expand Down
61 changes: 1 addition & 60 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from os.path import join
from sys import path as PATH

from setuptools import Distribution as _Distribution, setup, __version__ as setuptools_version
from setuptools import Distribution as _Distribution, setup
from setuptools.extension import Extension

# Define the package root directory and add it to the system path
Expand All @@ -25,18 +25,6 @@

LIB_TARBALL_URL = f'https://github.com/bitcoin-core/secp256k1/archive/{UPSTREAM_REF}.tar.gz'

globals_ = {}
with open(join(COINCURVE_ROOT_DIR, 'src', 'coincurve', '_version.py')) as fp:
exec(fp.read(), globals_) # noqa S102
__version__ = globals_['__version__']

# We require setuptools >= 3.3
if [int(i) for i in setuptools_version.split('.', 2)[:2]] < [3, 3]:
raise SystemExit(
f'Your setuptools version ({setuptools_version}) is too old to correctly install this package. Please upgrade '
f'to a newer version (>= 3.3).'
)

LIB_NAME = 'libsecp256k1'
PKG_NAME = 'coincurve'

Expand Down Expand Up @@ -82,55 +70,8 @@ def main():
)

setup(
name='coincurve',
version=__version__,

description='Cross-platform Python CFFI bindings for libsecp256k1',
long_description=open('README.md', 'r').read(),
long_description_content_type='text/markdown',
author_email='Ofek Lev <oss@ofek.dev>',
license='MIT OR Apache-2.0',

python_requires='>=3.8',
install_requires=['asn1crypto', 'cffi>=1.3.0'],

packages=['coincurve'],
package_dir={'coincurve': 'src/coincurve'},

distclass=Distribution,
zip_safe=False,

project_urls={
'Documentation': 'https://ofek.dev/coincurve/',
'Issues': 'https://github.com/ofek/coincurve/issues',
'Source': 'https://github.com/ofek/coincurve',
},
keywords=[
'secp256k1',
'crypto',
'elliptic curves',
'bitcoin',
'ethereum',
'cryptocurrency',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries',
'Topic :: Security :: Cryptography',
],
**setup_kwargs
)

Expand Down

0 comments on commit 5288cb8

Please sign in to comment.