Skip to content

Commit

Permalink
Switch to pyproject.toml and relax dependencies
Browse files Browse the repository at this point in the history
pypcode is now an optional dependency and the upper bound requirements for other packages have been remove
  • Loading branch information
patacca committed Sep 27, 2023
1 parent 97188fc commit fe701ba
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 58 deletions.
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[build-system]
requires = ["setuptools", "protobuf_distutils"]
build-backend = "setuptools.build_meta"

[project]
name = "quokka-project"
description = "Quokka: A Fast and Accurate Binary Exporter"
authors = [{ name = "Quarkslab", email = "[email protected]" }]
license = { text = "Apache Software License (Apache License, Version 2)" }
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.8"
dependencies = ["capstone>=4.0.2", "networkx>=2.4", "protobuf>=3.12.2"]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/quarkslab/quokka/"
Repository = "https://github.com/quarkslab/quokka/"
Documentation = "https://quarkslab.github.io/quokka/"
"Bug Tracker" = "https://github.com/quarkslab/quokka/issues"

[project.optional-dependencies]
test = [
"pytest",
"pytest-mock",
"pytest-cov",
"coverage[toml]",
"pypcode>=1.1.1",
]
pypcode = ["pypcode>=1.1.1"]
doc = [
"mkdocs",
"mkdocs-material",
"mkdocstrings",
"mkdocstrings-python",
"mkdocs-literate-nav",
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-gen-files",
"mkdocs-simple-hooks",
]
dev = [
"black",
"ipython",
"flake8",
"flake8-black",
"mypy",
"mypy-protobuf",
"nox",
"pypcode>=1.1.1",
]

[tool.setuptools]
packages = ["quokka", "quokka.analysis", "quokka.backends"]
package-dir = { "" = "bindings/python/" }
package-data = { "quokka" = ["*.pyi", "*.typed"] }
60 changes: 2 additions & 58 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,73 +17,17 @@
from setuptools import setup
from os.path import normpath

with open("README.md", "r") as fd:
readme = fd.read()

main_ns = {}
ver_path = normpath('bindings/python/quokka/version.py')
ver_path = normpath("bindings/python/quokka/version.py")
with open(ver_path) as ver_file:
exec(ver_file.read(), main_ns)

setup(
name="quokka-project",
version=main_ns['__version__'],
author="Alexis <dm> Challande",
author_email="[email protected]",
url="https://github.com/quarkslab/quokka",
project_urls={
"Documentation": "https://quarkslab.github.io/quokka/",
"Bug Tracker": "https://github.com/quarkslab/quokka/issues",
"Source": "https://github.com/quarkslab/quokka/",
},
description="Quokka : A Fast and Accurate Binary Exporter",
long_description=readme,
long_description_content_type="text/markdown",
python_requires=">=3.8",
packages=["quokka", "quokka.analysis", "quokka.backends"],
package_dir={"": "bindings/python/"},
package_data={"quokka": ["*.pyi", "*.typed"]},
setup_requires=[
"protobuf_distutils",
],
license="Apache-2",
version=main_ns["__version__"],
options={
"generate_py_protobufs": {
"source_dir": "proto",
"output_dir": "bindings/python/quokka",
},
},
install_requires=[
"capstone>=4.0.2,<5",
"networkx>=2.4,<3",
"protobuf>=3.12.2,<4",
"pypcode>=1.1.1,<2",
],
extras_require={
"test": [
"pytest",
"pytest-mock",
"pytest-cov",
"coverage[toml]",
],
"doc": [
"mkdocs",
"mkdocs-material",
"mkdocstrings",
"mkdocstrings-python",
"mkdocs-literate-nav",
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-gen-files",
"mkdocs-simple-hooks",
],
"dev": [
"black",
"ipython",
"flake8",
"flake8-black",
"mypy",
"mypy-protobuf",
"nox",
],
},
)

0 comments on commit fe701ba

Please sign in to comment.