-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: move most setup.py options into setup.cfg
- Loading branch information
Showing
2 changed files
with
32 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |