Skip to content

Commit b73e304

Browse files
committed
Remove setup.py/.cfg in favor of pyproject.toml
- fix version check for pandas
1 parent 44fab74 commit b73e304

File tree

5 files changed

+89
-74
lines changed

5 files changed

+89
-74
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ The released versions correspond to PyPI releases.
3636
* replace session-scoped with module-scoped fixture in test,
3737
run pytest over all tests in docker containers
3838
(see [#1151](../../issues/1151))
39+
* remove `setup.py` and `setup.cfg` in favor of `pyproject.toml`
3940

4041
## [Version 5.8.0](https://pypi.python.org/pypi/pyfakefs/5.8.0) (2025-03-11)
4142
Adds preliminary support for Python 3.14.

pyfakefs/patched_packages.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@
4949

5050
# From pandas v 1.2 onwards the python fs functions are used even when the engine
5151
# selected is "c". This means that we don't explicitly have to change the engine.
52-
patch_pandas = parsers is not None and [int(v) for v in pd.__version__.split(".")] < [
52+
patch_pandas = parsers is not None and [
53+
int(v) for v in pd.__version__.split(".")[:2]
54+
] < [
5355
1,
5456
2,
55-
0,
5657
]
5758

5859

pyproject.toml

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,87 @@
11
[build-system]
2-
requires = ["setuptools"]
2+
requires = ["setuptools>=45"]
33
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pyfakefs"
7+
description = "Implements a fake file system that mocks the Python file system modules."
8+
readme = "README.md"
9+
# change this to be PEP-639-conform after 3.8 is out of support
10+
license = {file = "COPYING"}
11+
12+
authors = [
13+
{ name = "Google", email = "[email protected]" },
14+
{ name = "John McGehee", email = "[email protected]" }
15+
]
16+
maintainers = [
17+
{ name = "mrbean-bremen", email = "[email protected]" }
18+
]
19+
classifiers = [
20+
"Development Status :: 5 - Production/Stable",
21+
"Environment :: Console",
22+
"Intended Audience :: Developers",
23+
"License :: OSI Approved :: Apache Software License",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3.7",
26+
"Programming Language :: Python :: 3.8",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Programming Language :: Python :: Implementation :: CPython",
33+
"Programming Language :: Python :: Implementation :: PyPy",
34+
"Operating System :: POSIX",
35+
"Operating System :: MacOS",
36+
"Operating System :: Microsoft :: Windows",
37+
"Topic :: Software Development :: Libraries",
38+
"Topic :: Software Development :: Libraries :: Python Modules",
39+
"Topic :: Software Development :: Testing",
40+
"Topic :: System :: Filesystems",
41+
"Framework :: Pytest",
42+
]
43+
keywords = [
44+
"testing",
45+
"filesystem",
46+
"mocking",
47+
"unittest",
48+
"pytest",
49+
]
50+
requires-python = ">=3.7"
51+
dynamic = ["version"]
52+
entry-points.pytest11.fakefs = "pyfakefs.pytest_plugin"
53+
54+
[project.urls]
55+
documentation = "https://pytest-pyfakefs.readthedocs.io/"
56+
homepage = "https://github.com/pytest-dev/pyfakefs"
57+
repository = "https://github.com/pytest-dev/pyfakefs"
58+
changelog = "https://github.com/pytest-dev/pyfakefs/blob/main/CHANGES.md"
59+
60+
[dependency-groups]
61+
dev = [
62+
"pytest>=6.2.5",
63+
"pre-commit>=4.1.4",
64+
]
65+
doc = [
66+
"sphinx>=7.0.0",
67+
"furo>=2024.8.6"
68+
]
69+
extra = [
70+
"pandas==1.3.5; python_version == '3.7'",
71+
"pandas==2.0.3; python_version == '3.8'",
72+
"pandas==2.2.3; python_version > '3.8'",
73+
"xlrd==2.0.1",
74+
"openpyxl==3.1.3; python_version == '3.7'",
75+
"openpyxl==3.1.5; python_version > '3.7'",
76+
]
77+
xdist = [
78+
"pytest-xdist",
79+
]
80+
81+
[tool.setuptools]
82+
packages = ["pyfakefs"]
83+
[tool.setuptools.package-data]
84+
pyfakefs = ["py.typed"]
85+
86+
[tool.setuptools.dynamic]
87+
version = { attr = "pyfakefs.__version__" }

setup.cfg

Lines changed: 0 additions & 67 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)