Skip to content

Commit

Permalink
build: move most setup.py options into setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
jolars committed Nov 30, 2023
1 parent f7387c0 commit 9675a7d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
32 changes: 32 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[metadata]
name = sortedl1
version = attr: sortedl1.version.__version__
maintainer = Johan Larsson
maintainer_email = [email protected]
author = Johan Larsson, Mathurin Massias, Quentin Klopfenstein
author_email = [email protected]
description = Sorted L-One Penalized Estimation (SLOPE)
long_description = file: README.md, CHANGELOG.md
url = https://jolars.github.io/sortedl1/
project_urls =
Source = https://github.com/jolars/sortedl1
Documentation = https://jolars.github.io/sortedl1/
license_files = LICENSE

[options]
packages = sortedl1
zip_safe = False
python_requires = >=3.7
install_requires =
numpy
scipy
scikit-learn

[options.extras_require]
docs =
sphinx
sphinx_rtd_theme

[options.entry_points]
console_scripts =
script_name = package.module:function_name
28 changes: 0 additions & 28 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,45 +1,17 @@
import os
from glob import glob

from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import setup

# Setup boilerplate below this line.

# Set version from version.py
package_root = os.path.abspath(os.path.dirname(__file__))
version = {}
with open(os.path.join(package_root, "sortedl1/version.py")) as fp:
exec(fp.read(), version)
__version__ = version["__version__"]

install_requires = ["numpy", "scipy", "scikit-learn"]

ext_modules = [
Pybind11Extension(
"_sortedl1",
sorted(glob("src/**/*.cpp", recursive=True)),
define_macros=[("VERSION_INFO", __version__)],
include_dirs=["external/"],
),
]

setup(
name="sortedl1",
version=__version__,
author="Johan Larsson",
author_email="[email protected]",
url="https://github.com/jolars/sortedl1",
description="Sorted L-One Penalized Estimation (SLOPE)",
long_description="",
install_requires=install_requires,
extras_require={
"docs": [
"sphinx",
"sphinx_rtd_theme",
]
},
ext_modules=ext_modules,
cmdclass={"build_ext": build_ext},
zip_safe=False,
)

0 comments on commit 9675a7d

Please sign in to comment.