Skip to content

Commit

Permalink
Testing removing setup.py for pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelien Besnier committed Jan 24, 2024
1 parent 52b897f commit 1cfcb84
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 80 deletions.
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build:
preserve_egg_dir: True
string: phenomenal
script:
- {{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt
- {{ PYTHON }} setup.py.bak install --single-version-externally-managed --record record.txt

requirements:

Expand Down
53 changes: 53 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "openalea.phenomenal"
authors = [
{name = "Simon Artzet", email = "[email protected]"},
{name = "Christian Fournier"},
{name = "Brichet Nicolas"},
{name = "Chopard Jerome"},
{name = "Mielewczik Michael"},
{name = "Christophe Pradal"},
]
license = {file = "LICENSE.txt"}
description = ""
requires-python = ">=3.9"
keywords = ["openalea"]
classifiers = [
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
"Programming Language :: Python :: 3",
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
dependencies = [
'numpy',
'cython',
'numba',
'pandas',
'opencv_python',
'scipy',
'scikit-image',
'scikit-learn',
'networkx',
'matplotlib',
'vtk',
'pytest',
]
dynamic = ["version", "readme"]


[tool.setuptools.dynamic]
version = {attr = "openalea.phenomenal.__version__"}
readme = {file = ["README.md"]}

[tool.setuptools.packages.find]
where = ["src"] # list of folders that contain the packages (["."] by default)
include = ["openalea.phenomenal*"] # package names should match these glob patterns (["*"] by default)
exclude = ["test*"] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
125 changes: 46 additions & 79 deletions setup.py → setup.py.bak
Original file line number Diff line number Diff line change
@@ -1,79 +1,46 @@
# -*- python -*-
#
# Copyright INRIA - CIRAD - INRA
#
# File author(s):
#
# File contributor(s):
#
# Distributed under the Cecill-C License.
# See accompanying file LICENSE.txt or copy at
# http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html
#
# OpenAlea WebSite : http://openalea.gforge.inria.fr
#
# ==============================================================================
"""
"""
# ==============================================================================
import numpy
from Cython.Build import cythonize
from setuptools import setup, find_packages, Extension, Command
# ==============================================================================

namespace = "openalea"
pkg_root_dir = 'src'
packages = [pkg for pkg in find_packages(pkg_root_dir)]
top_pkgs = [pkg for pkg in packages if len(pkg.split('.')) <= 2]
package_dir = dict([('', pkg_root_dir)] +
[(pkg, pkg_root_dir + "/" + pkg.replace('.', '/'))
for pkg in top_pkgs])


extentions = [
Extension('openalea.phenomenal.segmentation._c_skeleton',
sources=['src/openalea/phenomenal/segmentation/src/skeleton.pyx',
'src/openalea/phenomenal/segmentation/src/skel.cpp'],
include_dirs=[numpy.get_include()],
language="c++"),
Extension('openalea.phenomenal.multi_view_reconstruction._c_mvr',
sources=['src/openalea/phenomenal/multi_view_reconstruction/src/c_mvr.pyx',
'src/openalea/phenomenal/multi_view_reconstruction/src/integral_image.cpp'],
include_dirs=[numpy.get_include()],
language="c++")
]

setup(
name="openalea.phenomenal",
version="1.8.1",
description="",
long_description="",

author="* Simon Artzet\n"
"* Christian Fournier\n"
"* Mielewczik Michael\n"
"* Brichet Nicolas\n"
"* Chopard Jerome\n"
"* Christophe Pradal\n",

author_email="[email protected]",
maintainer="Simon Artzet",
maintainer_email="[email protected]",

url="https://github.com/openalea/phenomenal",
license="Cecill-C",
keywords='',

# package installation
packages=packages,
package_dir=package_dir,
zip_safe=False,
ext_modules=cythonize(extentions),

entry_points={
"wralea": ["openalea.phenomenal = openalea.phenomenal_wralea", ],
},

# See MANIFEST.in
include_package_data=True,
)
# -*- python -*-
#
# Copyright INRIA - CIRAD - INRA
#
# File author(s):
#
# File contributor(s):
#
# Distributed under the Cecill-C License.
# See accompanying file LICENSE.txt or copy at
# http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html
#
# OpenAlea WebSite : http://openalea.gforge.inria.fr
#
# ==============================================================================
"""
"""
# ==============================================================================
import numpy
from Cython.Build import cythonize
from setuptools import setup, Extension
# ==============================================================================


extentions = [
Extension('openalea.phenomenal.segmentation._c_skeleton',
sources=['src/openalea/phenomenal/segmentation/src/skeleton.pyx',
'src/openalea/phenomenal/segmentation/src/skel.cpp'],
include_dirs=[numpy.get_include()],
language="c++"),
Extension('openalea.phenomenal.multi_view_reconstruction._c_mvr',
sources=['src/openalea/phenomenal/multi_view_reconstruction/src/c_mvr.pyx',
'src/openalea/phenomenal/multi_view_reconstruction/src/integral_image.cpp'],
include_dirs=[numpy.get_include()],
language="c++")
]

setup(
name="openalea.phenomenal",
ext_modules=cythonize(extentions),
entry_points={
"wralea": ["openalea.phenomenal = openalea.phenomenal_wralea", ],
},
# See MANIFEST.in
include_package_data=True,
)
1 change: 1 addition & 0 deletions src/openalea/phenomenal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
# http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html
#
# ==============================================================================
from .version import __version__
5 changes: 5 additions & 0 deletions src/openalea/phenomenal/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
major = 1
minor = 8
post = 2

__version__ = ".".join([str(s) for s in (major, minor, post)])

0 comments on commit 1cfcb84

Please sign in to comment.