Skip to content

Commit abdbe6c

Browse files
author
Murilo Marinho
committed
[setup] Compliance with PEP517 (Fix #65).
1 parent 87a8b2c commit abdbe6c

3 files changed

Lines changed: 36 additions & 26 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ if(APPLE)
2121
/opt/homebrew/include
2222
/opt/homebrew/include/eigen3
2323
)
24+
add_compile_options(-Werror=return-type -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Woverloaded-virtual)
25+
endif()
26+
27+
if(UNIX AND NOT APPLE)
28+
add_compile_options(-Werror=return-type -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Woverloaded-virtual -fPIC)
2429
endif()
2530

2631
if(WIN32)

pyproject.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=42",
4+
"wheel",
5+
"ninja",
6+
"cmake>=3.12",
7+
"setuptools-git-versioning>=2.0,<3"
8+
]
9+
build-backend = "setuptools.build_meta"
10+
11+
[project]
12+
authors = [
13+
{name = "Murilo M. Marinho", email = "murilomarinho@ieee.org"}
14+
]
15+
maintainers = [
16+
{name = "Murilo M. Marinho", email = "murilomarinho@ieee.org"}
17+
]
18+
name = 'dqrobotics'
19+
dynamic = ["version", "classifiers"]
20+
dependencies=[
21+
'numpy',
22+
]
23+
description='dqrobotics Python'
24+
readme = "README.md"
25+
26+
# https://pypi.org/project/setuptools-git-versioning/
27+
[tool.setuptools-git-versioning]
28+
enabled = true
29+
# https://stackoverflow.com/questions/73605607/how-to-use-setuptools-scm
30+
dev_template = "{tag}.a{ccount}"
31+
dirty_template = "{tag}.a{ccount}"

setup.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@
99
from distutils.version import LooseVersion
1010

1111

12-
# Automatic name branching
13-
def format_branch_name(name):
14-
if name == "master":
15-
# The master branch is considered an Alpha release
16-
return "a"
17-
elif name == "release":
18-
return ""
19-
else:
20-
return name
21-
22-
2312
# read the contents of your README file
2413
with open("README.md", "r") as fh:
2514
long_description = fh.read()
@@ -81,25 +70,10 @@ def build_extension(self, ext):
8170

8271

8372
setup(
84-
name='dqrobotics',
85-
version_config={
86-
"template": "{tag}.{branch}{ccount}",
87-
"dev_template": "{tag}.{branch}{ccount}",
88-
"dirty_template": "{tag}.{branch}{ccount}",
89-
"branch_formatter": format_branch_name,
90-
},
91-
setup_requires=['setuptools-git-versioning==1.7.3'],
92-
author='Murilo Marques Marinho',
9373
author_email='murilomarinho@ieee.org',
94-
description='DQRobotics Python',
95-
long_description=long_description,
96-
long_description_content_type='text/markdown',
9774
url="https://github.com/dqrobotics/python",
9875
ext_modules=[CMakeExtension('dqrobotics._dqrobotics')],
9976
cmdclass=dict(build_ext=CMakeBuild),
100-
install_requires=[
101-
'numpy',
102-
],
10377
zip_safe=False,
10478
packages=['dqrobotics',
10579
'dqrobotics.robots',

0 commit comments

Comments
 (0)