-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BLD: move metadata to setup.cfg #38852
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
Changes from all commits
8e9a503
229a7f2
0199b1a
0f737e4
8191bc4
5327578
10f4a4c
5de4991
e9f7b84
ec33ac9
ea10a0f
50edbd8
24c4e29
ffd90a7
b25bf90
e2f83df
75f3e27
2840c65
61a1aef
5752a09
b3e9f3c
e8ab481
0d2a9f1
20da426
3377c1f
5b0a817
de38f59
0fa7b0d
0026b00
21b8797
68e34f3
769ddef
1156724
94c8eff
37e8a82
012f859
20d24b5
94c1de0
e3b0cd2
d2510be
25d1f4a
75e7004
defcccb
27dfd7e
a230b15
b4a8b61
5b614df
674e728
cb757e4
a5d8987
6ae0c56
b227a64
dd75479
424c194
12d360f
a69cf7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
[build-system] | ||
# Minimum requirements for the build system to execute. | ||
# See https://github.com/scipy/scipy/pull/10431 for the AIX issue. | ||
# See https://github.com/scipy/scipy/pull/12940 for the AIX issue. | ||
requires = [ | ||
"setuptools", | ||
"setuptools>=38.6.0", | ||
"wheel", | ||
"Cython>=0.29.21,<3", # Note: sync with setup.py | ||
"numpy==1.16.5; python_version=='3.7' and platform_system!='AIX'", | ||
"numpy==1.17.3; python_version=='3.8' and platform_system!='AIX'", | ||
"numpy==1.16.5; python_version=='3.7' and platform_system=='AIX'", | ||
"numpy==1.17.3; python_version=='3.8' and platform_system=='AIX'", | ||
"numpy==1.16.5; python_version=='3.7'", | ||
"numpy==1.17.3; python_version=='3.8'", | ||
fangchenli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"numpy; python_version>='3.9'", | ||
] | ||
# uncomment to enable pep517 after versioneer problem is fixed. | ||
# https://github.com/python-versioneer/python-versioneer/issues/193 | ||
# build-backend = "setuptools.build_meta" | ||
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could modify PATH and uncomment this line to enable pep517. But I feel that may require some discussion. |
||
|
||
[tool.black] | ||
target-version = ['py37', 'py38'] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,65 @@ | ||
[metadata] | ||
name = pandas | ||
description = Powerful data structures for data analysis, time series, and statistics | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
fangchenli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
url = https://pandas.pydata.org | ||
author = The Pandas Development Team | ||
author_email = [email protected] | ||
license = BSD-3-Clause | ||
license_file = LICENSE | ||
platforms = any | ||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
Environment :: Console | ||
Intended Audience :: Science/Research | ||
License :: OSI Approved :: BSD License | ||
Operating System :: OS Independen | ||
Programming Language :: Cython | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Topic :: Scientific/Engineering | ||
project_urls = | ||
Bug Tracker = https://github.com/pandas-dev/pandas/issues | ||
Documentation = https://pandas.pydata.org/pandas-docs/stable | ||
Source Code = https://github.com/pandas-dev/pandas | ||
|
||
[options] | ||
packages = find: | ||
install_requires = | ||
numpy>=1.16.5 | ||
python-dateutil>=2.7.3 | ||
pytz>=2017.3 | ||
python_requires = >=3.7.1 | ||
include_package_data = True | ||
zip_safe = False | ||
|
||
[options.entry_points] | ||
pandas_plotting_backends = | ||
matplotlib = pandas:plotting._matplotlib | ||
|
||
[options.extras_require] | ||
test = | ||
hypothesis>=3.58 | ||
pytest>=5.0.1 | ||
pytest-xdist | ||
|
||
[options.package_data] | ||
* = templates/*, _libs/**/*.dll | ||
|
||
[build_ext] | ||
inplace = 1 | ||
inplace = True | ||
|
||
[options.packages.find] | ||
include = pandas, pandas.* | ||
|
||
# See the docstring in versioneer.py for instructions. Note that you must | ||
# re-run 'versioneer.py setup' after changing this section, and commit the | ||
# resulting files. | ||
|
||
[versioneer] | ||
VCS = git | ||
style = pep440 | ||
|
@@ -38,16 +92,16 @@ bootstrap = | |
import pandas as pd | ||
np # avoiding error when importing again numpy or pandas | ||
pd # (in some cases we want to do it to show users) | ||
ignore = E203, # space before : (needed for how black formats slicing) | ||
E402, # module level import not at top of file | ||
W503, # line break before binary operator | ||
# Classes/functions in different blocks can generate those errors | ||
fangchenli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
E302, # expected 2 blank lines, found 0 | ||
E305, # expected 2 blank lines after class or function definition, found 0 | ||
# We use semicolon at the end to avoid displaying plot objects | ||
fangchenli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
E703, # statement ends with a semicolon | ||
E711, # comparison to none should be 'if cond is none:' | ||
|
||
ignore = | ||
E203, # space before : (needed for how black formats slicing) | ||
E402, # module level import not at top of file | ||
W503, # line break before binary operator | ||
# Classes/functions in different blocks can generate those errors | ||
E302, # expected 2 blank lines, found 0 | ||
E305, # expected 2 blank lines after class or function definition, found 0 | ||
# We use semicolon at the end to avoid displaying plot objects | ||
E703, # statement ends with a semicolon | ||
E711, # comparison to none should be 'if cond is none:' | ||
exclude = | ||
doc/source/development/contributing_docstring.rst, | ||
# work around issue of undefined variable warnings | ||
|
@@ -64,18 +118,18 @@ xfail_strict = True | |
filterwarnings = | ||
error:Sparse:FutureWarning | ||
error:The SparseArray:FutureWarning | ||
junit_family=xunit2 | ||
junit_family = xunit2 | ||
|
||
[codespell] | ||
ignore-words-list=ba,blocs,coo,hist,nd,ser | ||
ignore-regex=https://(\w+\.)+ | ||
ignore-words-list = ba,blocs,coo,hist,nd,ser | ||
ignore-regex = https://(\w+\.)+ | ||
|
||
[coverage:run] | ||
branch = False | ||
omit = | ||
*/tests/* | ||
pandas/_typing.py | ||
pandas/_version.py | ||
*/tests/* | ||
pandas/_typing.py | ||
pandas/_version.py | ||
plugins = Cython.Coverage | ||
|
||
[coverage:report] | ||
|
@@ -130,10 +184,10 @@ warn_unused_ignores = True | |
show_error_codes = True | ||
|
||
[mypy-pandas.tests.*] | ||
check_untyped_defs=False | ||
check_untyped_defs = False | ||
|
||
[mypy-pandas._version] | ||
check_untyped_defs=False | ||
check_untyped_defs = False | ||
|
||
[mypy-pandas.io.clipboard] | ||
check_untyped_defs=False | ||
check_untyped_defs = False |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
import sys | ||
|
||
import numpy | ||
from setuptools import Command, Extension, find_packages, setup | ||
from setuptools import Command, Extension, setup | ||
from setuptools.command.build_ext import build_ext as _build_ext | ||
|
||
import versioneer | ||
|
@@ -34,7 +34,6 @@ def is_platform_mac(): | |
return sys.platform == "darwin" | ||
|
||
|
||
min_numpy_ver = "1.16.5" | ||
min_cython_ver = "0.29.21" # note: sync with pyproject.toml | ||
|
||
try: | ||
|
@@ -99,96 +98,6 @@ def build_extensions(self): | |
super().build_extensions() | ||
|
||
|
||
DESCRIPTION = "Powerful data structures for data analysis, time series, and statistics" | ||
LONG_DESCRIPTION = """ | ||
**pandas** is a Python package that provides fast, flexible, and expressive data | ||
structures designed to make working with structured (tabular, multidimensional, | ||
potentially heterogeneous) and time series data both easy and intuitive. It | ||
aims to be the fundamental high-level building block for doing practical, | ||
**real world** data analysis in Python. Additionally, it has the broader goal | ||
of becoming **the most powerful and flexible open source data analysis / | ||
manipulation tool available in any language**. It is already well on its way | ||
toward this goal. | ||
|
||
pandas is well suited for many different kinds of data: | ||
|
||
- Tabular data with heterogeneously-typed columns, as in an SQL table or | ||
Excel spreadsheet | ||
- Ordered and unordered (not necessarily fixed-frequency) time series data. | ||
- Arbitrary matrix data (homogeneously typed or heterogeneous) with row and | ||
column labels | ||
- Any other form of observational / statistical data sets. The data actually | ||
need not be labeled at all to be placed into a pandas data structure | ||
|
||
The two primary data structures of pandas, Series (1-dimensional) and DataFrame | ||
(2-dimensional), handle the vast majority of typical use cases in finance, | ||
statistics, social science, and many areas of engineering. For R users, | ||
DataFrame provides everything that R's ``data.frame`` provides and much | ||
more. pandas is built on top of `NumPy <https://www.numpy.org>`__ and is | ||
intended to integrate well within a scientific computing environment with many | ||
other 3rd party libraries. | ||
|
||
Here are just a few of the things that pandas does well: | ||
|
||
- Easy handling of **missing data** (represented as NaN) in floating point as | ||
well as non-floating point data | ||
- Size mutability: columns can be **inserted and deleted** from DataFrame and | ||
higher dimensional objects | ||
- Automatic and explicit **data alignment**: objects can be explicitly | ||
aligned to a set of labels, or the user can simply ignore the labels and | ||
let `Series`, `DataFrame`, etc. automatically align the data for you in | ||
computations | ||
- Powerful, flexible **group by** functionality to perform | ||
split-apply-combine operations on data sets, for both aggregating and | ||
transforming data | ||
- Make it **easy to convert** ragged, differently-indexed data in other | ||
Python and NumPy data structures into DataFrame objects | ||
- Intelligent label-based **slicing**, **fancy indexing**, and **subsetting** | ||
of large data sets | ||
- Intuitive **merging** and **joining** data sets | ||
- Flexible **reshaping** and pivoting of data sets | ||
- **Hierarchical** labeling of axes (possible to have multiple labels per | ||
tick) | ||
- Robust IO tools for loading data from **flat files** (CSV and delimited), | ||
Excel files, databases, and saving / loading data from the ultrafast **HDF5 | ||
format** | ||
- **Time series**-specific functionality: date range generation and frequency | ||
conversion, moving window statistics, date shifting and lagging. | ||
|
||
Many of these principles are here to address the shortcomings frequently | ||
experienced using other languages / scientific research environments. For data | ||
scientists, working with data is typically divided into multiple stages: | ||
munging and cleaning data, analyzing / modeling it, then organizing the results | ||
of the analysis into a form suitable for plotting or tabular display. pandas is | ||
the ideal tool for all of these tasks. | ||
""" | ||
|
||
DISTNAME = "pandas" | ||
LICENSE = "BSD" | ||
AUTHOR = "The PyData Development Team" | ||
EMAIL = "[email protected]" | ||
URL = "https://pandas.pydata.org" | ||
DOWNLOAD_URL = "" | ||
PROJECT_URLS = { | ||
"Bug Tracker": "https://github.com/pandas-dev/pandas/issues", | ||
"Documentation": "https://pandas.pydata.org/pandas-docs/stable/", | ||
"Source Code": "https://github.com/pandas-dev/pandas", | ||
} | ||
CLASSIFIERS = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Operating System :: OS Independent", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Cython", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
|
||
|
||
class CleanCommand(Command): | ||
"""Custom distutils command to clean the .so and .pyc files.""" | ||
|
||
|
@@ -711,51 +620,11 @@ def srcpath(name=None, suffix=".pyx", subdir="src"): | |
# ---------------------------------------------------------------------- | ||
|
||
|
||
def setup_package(): | ||
setuptools_kwargs = { | ||
"install_requires": [ | ||
"python-dateutil >= 2.7.3", | ||
"pytz >= 2017.3", | ||
f"numpy >= {min_numpy_ver}", | ||
], | ||
"setup_requires": [f"numpy >= {min_numpy_ver}"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The added workflow pip installs pandas without the requirements pre-installed. Seems to pull in requirements OK. (I also wanted to test with other versions of setuptools locally though before approving this PR) OT for the sdist build step we do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But you installed numpy in that workflow, so the question is maybe what would happen if numpy was not installed? (having the setup_requires might give a nicer error message?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's why I created 2 different conda environments. so numpy is not in the pip-test environment. (In #36704 the build and test steps are done independently - here I just added a stripped down workflow that we maybe could consider adding permanently to the the ci) |
||
"zip_safe": False, | ||
} | ||
|
||
if __name__ == "__main__": | ||
# Freeze to support parallel compilation when using spawn instead of fork | ||
multiprocessing.freeze_support() | ||
setup( | ||
name=DISTNAME, | ||
maintainer=AUTHOR, | ||
version=versioneer.get_version(), | ||
packages=find_packages(include=["pandas", "pandas.*"]), | ||
package_data={"": ["templates/*", "_libs/**/*.dll"]}, | ||
ext_modules=maybe_cythonize(extensions, compiler_directives=directives), | ||
maintainer_email=EMAIL, | ||
description=DESCRIPTION, | ||
license=LICENSE, | ||
cmdclass=cmdclass, | ||
url=URL, | ||
download_url=DOWNLOAD_URL, | ||
project_urls=PROJECT_URLS, | ||
long_description=LONG_DESCRIPTION, | ||
classifiers=CLASSIFIERS, | ||
platforms="any", | ||
python_requires=">=3.7.1", | ||
extras_require={ | ||
"test": [ | ||
# sync with setup.cfg minversion & install.rst | ||
"pytest>=5.0.1", | ||
"pytest-xdist", | ||
"hypothesis>=3.58", | ||
] | ||
}, | ||
entry_points={ | ||
"pandas_plotting_backends": ["matplotlib = pandas:plotting._matplotlib"] | ||
}, | ||
**setuptools_kwargs, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
# Freeze to support parallel compilation when using spawn instead of fork | ||
multiprocessing.freeze_support() | ||
setup_package() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://packaging.python.org/guides/using-manifest-in/, those are included by default.