Skip to content

Commit

Permalink
Fix distribution metadata (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek authored Feb 26, 2024
1 parent d492d2f commit b8e9dfe
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ jobs:
- uses: actions/checkout@v4

- name: Install build dependencies
run: python -m pip install --upgrade cffi
run: python -m pip install build

- name: Build source distribution
run: python setup.py sdist
run: python -m build --sdist

- name: Build Windows wheels
run: ./.github/scripts/build-windows-wheels.sh
Expand Down
41 changes: 0 additions & 41 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,6 @@
requires = ["setuptools>=61", "cffi>=1.3.0", "requests"]
build-backend = "setuptools.build_meta"

[project]
name = "coincurve"
version = "19.0.0"
authors = [
{ name="Ofek Lev", email="[email protected]" },
]
description = "Cross-platform Python CFFI bindings for libsecp256k1"
license = { file="LICENSE-MIT" }
keywords = ["secp256k1", "crypto", "elliptic curves", "bitcoin", "ethereum", "cryptocurrency"]
readme = "README.md"
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.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',
]

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

[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
Expand Down
47 changes: 43 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
_bdist_wheel = None

sys.path.append(os.path.abspath(os.path.dirname(__file__)))
from setup_support import absolute, build_flags, detect_dll, has_system_lib # noqa: E402
from setup_support import absolute, build_flags, detect_dll, has_system_lib

BUILDING_FOR_WINDOWS = detect_dll()

Expand Down Expand Up @@ -65,7 +65,7 @@ def download_library(command):
content.seek(0)
with tarfile.open(fileobj=content) as tf:
dirname = tf.getnames()[0].partition('/')[0]
tf.extractall()
tf.extractall() # noqa: S202
shutil.move(dirname, libdir)
else:
raise SystemExit('Unable to download secp256k1 library: HTTP-Status: %d', status_code)
Expand Down Expand Up @@ -287,7 +287,6 @@ def has_c_libraries(self):
extension.__dict__['extra_link_args'][i] = f'{v}.lib'

setup_kwargs = dict(
setup_requires=['cffi>=1.3.0', 'requests'],
ext_modules=[extension],
cmdclass={
'build_clib': build_clib,
Expand Down Expand Up @@ -318,7 +317,6 @@ def has_c_libraries(self):


setup_kwargs = dict(
setup_requires=['cffi>=1.3.0', 'requests'],
ext_package='coincurve',
cffi_modules=['_cffi_build/build.py:ffi'],
cmdclass={
Expand All @@ -335,10 +333,51 @@ def has_c_libraries(self):
name='coincurve',
version='19.0.0',

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 <[email protected]>',
license='MIT OR Apache-2.0',

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

packages=find_packages(exclude=('_cffi_build', '_cffi_build.*', 'libsecp256k1', 'tests')),
package_data=package_data,

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
)

0 comments on commit b8e9dfe

Please sign in to comment.