From 131c5de2edbd7c5a49c16c76e9f6fe3f573be392 Mon Sep 17 00:00:00 2001 From: gregkub <gregoire.kubler@proton.me> Date: Mon, 29 Apr 2024 17:22:02 +0200 Subject: [PATCH] feat : rework : now data centered in the pyproject.toml and not in the setup.py --- .gitignore | 3 ++- MANIFEST.in | 5 +++++ pyproject.toml | 34 +++++++++++++++++++++++++++------- requirements.txt | 9 ++++++++- setup.py | 24 ------------------------ 5 files changed, 42 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index f37378e30..bddd894ba 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__ *.pyc *.egg-info dist*/ +wheelhouse/* # Mermaid *.mmd @@ -19,4 +20,4 @@ dist*/ xml*/ # ONNX -*.onnx \ No newline at end of file +*.onnx diff --git a/MANIFEST.in b/MANIFEST.in index e69de29bb..eef7aa3b8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -0,0 +1,5 @@ +include project_name.txt + +recursive-include aidge-core *.py +recursive-include include *.h *.hpp +recursive-include src *.c *.cpp diff --git a/pyproject.toml b/pyproject.toml index 611692e74..6100fdce6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,33 @@ -# [project] -# name = "aidge_core" -# dependencies = ["numpy"] -# version="$(cat version.txt)" +[project] +name = "aidge_core" +description="Core implementations of the operators and graph of aidge framework" +version= "0.2.0" +dependencies = ["numpy"] +requires-python = ">= 3.7" +readme = "README.md" +license = { file = "LICENSE" } +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Programming Language :: Python :: 3" + ] +[build-system] +requires = ["setuptools>=68", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +##################################################### +#Â CIBUILDWHEEL [tool.cibuildwheel] build-frontend = "build" before-build = ["bash .gitlab/ci/cibuildwheel_build_deps_before_build_wheel.sh ${AIDGE_DEPENDENCIES}"] - [tool.cibuildwheel.environment] - -# aidge_core do not rely on any aidge dependency +# aidge_core do not rely on any aidge dependency, hence this string is empty AIGE_DEPENDENCIES = "" # format => "dep_1 dep_2 ... dep_n" + +##################################################### +#Â SETUPTOOLS +[tool.setuptools] +# packages=["aidge_core", "export"] + +# [tool.setuptools_scm] +# version_file = "version.py" diff --git a/requirements.txt b/requirements.txt index 24ce15ab7..0d59c2d34 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,8 @@ -numpy +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile pyproject.toml +# +numpy==1.26.4 + # via aidge_core (pyproject.toml) diff --git a/setup.py b/setup.py index faaafd9b8..df7a6bc2a 100644 --- a/setup.py +++ b/setup.py @@ -1,24 +1,7 @@ #!/usr/bin/env python3 -""" Aidge - -#TODO To change -POC of the next framework named Aidge -""" - -DOCLINES = (__doc__ or "").split("\n") - import sys import os -# Python supported version checks -if sys.version_info[:2] < (3, 7): - raise RuntimeError("Python version >= 3.7 required.") - - -CLASSIFIERS = """\ -Development Status :: 2 - Pre-Alpha -""" - import shutil import pathlib import subprocess @@ -118,13 +101,6 @@ class CMakeBuild(build_ext): if __name__ == "__main__": setup( - name=get_project_name(), - version=get_project_version(), - python_requires=">=3.7", - description=DOCLINES[0], - long_description_content_type="text/markdown", - long_description="\n".join(DOCLINES[2:]), - classifiers=[c for c in CLASSIFIERS.split("\n") if c], packages=find_packages(where="."), include_package_data=True, ext_modules=[CMakeExtension(get_project_name())], -- GitLab