Skip to content

Commit 3a0ea6e

Browse files
committed
setup
1 parent 8d52267 commit 3a0ea6e

File tree

5 files changed

+68
-46
lines changed

5 files changed

+68
-46
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
python -m pip install -r requirements-dev.txt
6262
6363
- name: Build package
64-
run: python setup.py bdist_wheel sdist
64+
run: python -m build
6565

6666
- name: Check package
6767
run: twine check dist/*

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
15
[tool.black]
26
line-length = 132
37

requirements-dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ mkdocs
1010
mkdocstrings[python]
1111
mkdocs-material
1212
markdown_include
13+
build

setup.cfg

+58-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,61 @@
1+
[metadata]
2+
name = cstruct
3+
version = attr: cstruct.__version__
4+
keywords = struct, cstruct, enum, binary, pack, unpack
5+
description = C-style structs for Python
6+
author = Andrea Bonomi
7+
author_email = andrea.bonomi@gmail.com
8+
url = http://github.com/andreax79/python-cstruct
9+
long_description = file: README.md
10+
long_description_content_type = text/markdown
11+
license = MIT
12+
license_files = LICENSE
13+
platforms = any
14+
classifiers =
15+
Development Status :: 5 - Production/Stable
16+
Environment :: Console
17+
Intended Audience :: Developers
18+
License :: OSI Approved :: MIT License
19+
Operating System :: OS Independent
20+
Programming Language :: Python
21+
Topic :: Software Development :: Libraries :: Python Modules
22+
Programming Language :: Python :: 3.6
23+
Programming Language :: Python :: 3.7
24+
Programming Language :: Python :: 3.8
25+
Programming Language :: Python :: 3.9
26+
Programming Language :: Python :: 3.10
27+
Programming Language :: Python :: 3.11
28+
project_urls =
29+
Bug Tracker = http://github.com/andreax79/python-cstruct/issues
30+
Documentation = https://python-cstruct.readthedocs.io/en/latest/
31+
Source Code = http://github.com/andreax79/python-cstruct
32+
33+
[options]
34+
zip_safe = True
35+
include_package_data = True
36+
python_requires = >=3.6
37+
packages = find:
38+
39+
[options.packages.find]
40+
include = cstruct*
41+
exclude =
42+
ez_setup
43+
examples
44+
tests
45+
46+
[options.extras_require]
47+
test = pytest
48+
49+
[aliases]
50+
test = pytest
51+
152
[bdist_wheel]
2-
universal=1
53+
universal = 1
354

455
[flake8]
5-
max-line-length=132
6-
ignore: E401, W504, E221
56+
max-line-length = 132
57+
extend-ignore =
58+
E203
59+
E401
60+
W504
61+
E221

setup.py

+4-42
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,5 @@
1-
from setuptools import setup, find_packages
2-
from cstruct import __version__
1+
#!/usr/bin/env python
2+
import setuptools
33

4-
5-
def readme():
6-
with open('README.md') as f:
7-
return f.read()
8-
9-
10-
setup(
11-
name='cstruct',
12-
version=__version__,
13-
description="C-style structs for Python",
14-
long_description="""\
15-
Convert C struct definitions into Python classes with methods for serializing/deserializing.""",
16-
classifiers=[
17-
'Operating System :: OS Independent',
18-
'Programming Language :: Python',
19-
'Topic :: Software Development :: Libraries :: Python Modules',
20-
'Programming Language :: Python :: 3.6',
21-
'Programming Language :: Python :: 3.7',
22-
'Programming Language :: Python :: 3.8',
23-
'Programming Language :: Python :: 3.9',
24-
'Programming Language :: Python :: 3.10',
25-
'Programming Language :: Python :: 3.11',
26-
],
27-
keywords='struct',
28-
author='Andrea Bonomi',
29-
author_email='andrea.bonomi@gmail.com',
30-
url='http://github.com/andreax79/python-cstruct',
31-
license='MIT',
32-
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
33-
include_package_data=True,
34-
zip_safe=True,
35-
install_requires=[
36-
# -*- Extra requirements: -*-
37-
],
38-
entry_points="""
39-
# -*- Entry points: -*-
40-
""",
41-
test_suite='tests',
42-
tests_require=['pytest'],
43-
)
4+
if __name__ == "__main__":
5+
setuptools.setup()

0 commit comments

Comments
 (0)