Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build #1

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
86 changes: 78 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,87 @@
[build-system]
# These are strictly build requirements. Runtime requirements are listed in
# INSTALL_REQUIRES in setup.py
requires = [
"setuptools>=59.2.0",
"setuptools",
"cython>=0.29.26,<3", # Sync with CYTHON_MIN_VER in setup
# Workaround for oldest supported numpy using 1.21.6, but SciPy 1.9.2+ requiring 1.22.3+
"oldest-supported-numpy; python_version!='3.10' or platform_system!='Windows' or platform_python_implementation=='PyPy'",
"numpy>=1.22.3; python_version=='3.10' and platform_system=='Windows' and platform_python_implementation != 'PyPy'",
"numpy; python_version>='3.12'",
"scipy>=1.4",
"numpy>=1.25.0",
"scipy>=1.11",
"setuptools_scm[toml]~=7.0.0"
]
build-backend = "setuptools.build_meta"

[project]
name = "statsmodels"
description = "Statistical computations and models for Python"
readme = "README.rst"
maintainers = [
{ name = "statsmodels Developers", email = "[email protected]" }
]
license = { file = "LICENSE.txt" }
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Programming Language :: Cython",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: OS Independent",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"License :: OSI Approved :: BSD License",
"Topic :: Office/Business :: Financial",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.10"
dependencies = [
"numpy>=1.25.0",
"scipy>=1.11",
"pandas>=2.0",
"patsy>=0.5.2", # released January 2018
"packaging>=21.3" # released Nov 2021
]

[project.optional-dependencies]
develop = [
# run
"matplotlib>=3",
"colorama",
"joblib",

# test
"pytest>=7.3.0",
"pytest-randomly",
"pytest-xdist",

# code quality
"flake8",
"isort",
]
docs = [
"sphinx",
"nbconvert",
"jupyter_client",
"ipykernel",
"matplotlib",
"nbformat",
"numpydoc",
"pandas-datareader",
]

[project.urls]
Homepage = "https://www.statsmodels.org/"
"Bug Tracker" = "https://github.com/statsmodels/statsmodels/issues"
"Documentation" = "https://www.statsmodels.org/stable/index.html"
"Source Code" = "https://github.com/statsmodels/statsmodels"

[tool.setuptools.packages.find]
include = ["LICENSE.txt", "setup.cfg"]

[tool.setuptools_scm]
write_to = "statsmodels/_version.py"

[tool.pytest.ini_options]
minversion = 7
testpaths = "statsmodels"
xfail_strict = true
addopts = "--strict"
23 changes: 0 additions & 23 deletions requirements-dev.txt

This file was deleted.

8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

6 changes: 1 addition & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
[metadata]
license_files =
LICENSE.txt

[tool:pytest]
minversion = 6
minversion = 7
testpaths = statsmodels
xfail_strict = true
addopts = --strict
Expand Down
76 changes: 0 additions & 76 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,71 +45,11 @@
###############################################################################
# Key Values that Change Each Release
###############################################################################
# These are strictly installation requirements. Builds requirements are
# managed in pyproject.toml
INSTALL_REQUIRES = []
with open("requirements.txt", encoding="utf-8") as req:
for line in req.readlines():
INSTALL_REQUIRES.append(line.split("#")[0].strip())

DEVELOP_REQUIRES = []
with open("requirements-dev.txt", encoding="utf-8") as req:
for line in req.readlines():
DEVELOP_REQUIRES.append(line.split("#")[0].strip())

CYTHON_MIN_VER = "0.29.26" # released 2020

EXTRAS_REQUIRE = {
"build": ["cython>=" + CYTHON_MIN_VER],
"develop": ["cython>=" + CYTHON_MIN_VER] + DEVELOP_REQUIRES,
"docs": [
"sphinx",
"nbconvert",
"jupyter_client",
"ipykernel",
"matplotlib",
"nbformat",
"numpydoc",
"pandas-datareader",
],
}

###############################################################################
# Values that rarely change
###############################################################################
DISTNAME = "statsmodels"
DESCRIPTION = "Statistical computations and models for Python"
README = SETUP_DIR.joinpath("README.rst").read_text()
LONG_DESCRIPTION = README
MAINTAINER = "statsmodels Developers"
MAINTAINER_EMAIL = "[email protected]"
URL = "https://www.statsmodels.org/"
LICENSE = "BSD License"
DOWNLOAD_URL = ""
PROJECT_URLS = {
"Bug Tracker": "https://github.com/statsmodels/statsmodels/issues",
"Documentation": "https://www.statsmodels.org/stable/index.html",
"Source Code": "https://github.com/statsmodels/statsmodels",
}

CLASSIFIERS = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Programming Language :: Cython",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: OS Independent",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"License :: OSI Approved :: BSD License",
"Topic :: Office/Business :: Financial",
"Topic :: Scientific/Engineering",
]

FILES_TO_INCLUDE_IN_PACKAGE = ["LICENSE.txt", "setup.cfg"]

FILES_COPIED_TO_PACKAGE = []
for filename in FILES_TO_INCLUDE_IN_PACKAGE:
Expand Down Expand Up @@ -384,27 +324,11 @@ def is_pure(self):


setup(
name=DISTNAME,
maintainer=MAINTAINER,
ext_modules=extensions,
maintainer_email=MAINTAINER_EMAIL,
description=DESCRIPTION,
license=LICENSE,
url=URL,
download_url=DOWNLOAD_URL,
project_urls=PROJECT_URLS,
long_description=LONG_DESCRIPTION,
classifiers=CLASSIFIERS,
platforms="any",
cmdclass=cmdclass,
packages=find_packages(),
package_data=package_data,
distclass=BinaryDistribution,
include_package_data=False, # True will install all files in repo
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
zip_safe=False,
python_requires=">=3.8",
)

# Clean-up copied files
Expand Down