Skip to content

Commit

Permalink
Use pyproject.toml to install build dependencies and specify metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mclegrand committed Aug 30, 2024
1 parent e96adff commit 750034c
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 43 deletions.
44 changes: 44 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[build-system]
requires = [
"numpy",
"setuptools",
"scipy",
"pytest-runner"
]
build-backend = "setuptools.build_meta"


[project]
name = "scikit-network"
version = "0.33.1"
dependencies = ['numpy>=1.22.4', 'scipy>=1.7.3']
authors = [{name = "Scikit-network team"}]
maintainers = [{name = "Thomas Bonald", email = "[email protected]"}]
description = "Graph algorithms"
readme = "README.rst"
license = {text = "BSD License"}
keywords = ["sknetwork"]
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Cython',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12'
]
requires-python = ">= 3.9"

[project.optional-dependencies]
test = ["pytest", "note", "pluggy>=0.7.1"]

[project.urls]
Repository = "https://github.com/sknetwork-team/scikit-network"
Documentation = "https://scikit-network.readthedocs.io/"
Changelog = "https://github.com/sknetwork-team/scikit-network/blob/master/HISTORY.rst"

3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ test = pytest

[tool:pytest]
collect_ignore = ['setup.py']

[options]
python_requires = >=3.9
41 changes: 1 addition & 40 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
"""Setup script."""

import numpy

from setuptools import find_packages, setup, Extension
from sysconfig import get_platform
Expand All @@ -10,18 +11,6 @@
import builtins
from glob import glob

import numpy

with open('README.rst') as readme_file:
readme = readme_file.read()

with open('HISTORY.rst') as history_file:
history = history_file.read()

requirements = ['numpy>=1.22.4', 'scipy>=1.7.3']

setup_requirements = ['pytest-runner']

test_requirements = ['pytest', 'nose', 'pluggy>=0.7.1']

# if any problems occur with macOS' clang not knowing the -fopenmp flag, see:
Expand Down Expand Up @@ -75,7 +64,6 @@ def finalize_options(self):
build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
builtins.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())


Expand Down Expand Up @@ -124,36 +112,9 @@ def finalize_options(self):


setup(
author="Scikit-network team",
author_email='[email protected]',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Cython',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12'
],
description="Graph algorithms",
install_requires=requirements,
license="BSD license",
long_description=readme + '\n\n' + history,
long_description_content_type='text/x-rst',
include_package_data=True,
keywords='sknetwork',
name='scikit-network',
packages=find_packages(),
setup_requires=setup_requirements,
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/sknetwork-team/scikit-network',
version='0.32.1',
zip_safe=False,
ext_modules=ext_modules,
include_dirs=[numpy.get_include()],
Expand Down

0 comments on commit 750034c

Please sign in to comment.