Skip to content

Commit aec0805

Browse files
committed
Restructure and change packaging, according to current advice
https://packaging.python.org/en/latest/overview/ Advice on binary extensions is unclear. https://packaging.python.org/en/latest/guides/packaging-binary-extensions/
1 parent d96f7bd commit aec0805

14 files changed

Lines changed: 30 additions & 31 deletions

File tree

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include *.txt
2-
recursive-include python3 *
2+
recursive-include src *

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "cobs"
7+
version = "1.2.0"
8+
authors = [
9+
{ name = "Craig McQueen", email = "python@craig.mcqueen.id.au" },
10+
]
11+
description = "Consistent Overhead Byte Stuffing (COBS)"
12+
keywords = [ "byte stuffing" ]
13+
readme = "README.rst"
14+
requires-python = ">=3.6"
15+
license = { file = "LICENSE.txt" }
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Intended Audience :: Developers",
19+
"License :: OSI Approved :: MIT License",
20+
"Programming Language :: Python :: 3",
21+
"Topic :: Communications",
22+
]
23+
24+
[project.urls]
25+
"Homepage" = "https://github.com/cmcqueen/cobs-python"
26+
"Bug Tracker" = "https://github.com/cmcqueen/cobs-python/issues"

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,17 @@
44

55
from setuptools import setup, Extension
66

7-
import _version
8-
97
if sys.version_info[0] == 2:
108
raise Exception('Python 2.x is no longer supported')
119

1210
setup_dict = dict(
13-
name='cobs',
14-
version=_version.__version__,
15-
description='Consistent Overhead Byte Stuffing (COBS)',
16-
author='Craig McQueen',
17-
author_email='python@craig.mcqueen.id.au',
18-
url='https://github.com/cmcqueen/cobs-python/',
1911
packages=[ 'cobs', 'cobs.cobs', 'cobs.cobsr', 'cobs._version', ],
2012
package_dir={
21-
'cobs' : 'python3/cobs',
22-
'cobs._version' : '_version',
13+
'cobs' : 'src/cobs',
2314
},
2415
ext_modules=[
25-
Extension('cobs.cobs._cobs_ext', [ 'python3/src/_cobs_ext.c', ]),
26-
Extension('cobs.cobsr._cobsr_ext', [ 'python3/src/_cobsr_ext.c', ]),
27-
],
28-
29-
long_description=open('README.rst').read(),
30-
31-
license="MIT",
32-
classifiers=[
33-
'Development Status :: 5 - Production/Stable',
34-
'Intended Audience :: Developers',
35-
'License :: OSI Approved :: MIT License',
36-
'Programming Language :: Python',
37-
'Programming Language :: Python :: 3',
38-
'Programming Language :: Python :: 3.6',
39-
'Programming Language :: Python :: 3.7',
40-
'Programming Language :: Python :: 3.8',
41-
'Programming Language :: Python :: 3.9',
42-
'Topic :: Communications',
16+
Extension('cobs.cobs._cobs_ext', [ 'src/ext/_cobs_ext.c', ]),
17+
Extension('cobs.cobsr._cobsr_ext', [ 'src/ext/_cobsr_ext.c', ]),
4318
],
4419
)
4520

0 commit comments

Comments
 (0)