Skip to content

Commit 3c93647

Browse files
Merge pull request #2702 from devitocodes/JDBetteridge/sdist-cleanup
install: Remove files and directories not needed for install
2 parents d67bdae + 791e269 commit 3c93647

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

MANIFEST.in

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
include versioneer.py
2-
include devito/_version.py
1+
# Explicitly include the requirements files
32
include requirements.txt
43
include requirements-optional.txt
54
include requirements-testing.txt
65
include requirements-mpi.txt
76
include requirements-nvidia.txt
7+
8+
# Exclude the Github, Binder and Docker directories
9+
prune .github
10+
prune binder
11+
prune docker
12+
# Exclude hidden files and YAML files
13+
exclude .* *.yml
14+
15+
# Exclude compiled and temporary files
16+
global-exclude *~ *.py[cod] *.so

devito/builtins/arithmetic.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,20 +180,28 @@ def inner(f, g):
180180
return f.dtype(n.data[0])
181181

182182

183-
red_doc = lambda func: f"""
184-
Retrieve the {func}imum.
183+
def mmin(f):
184+
"""
185+
Retrieve the minimum.
185186
186187
Parameters
187188
----------
188189
f : array_like or Function
189190
Input operand.
190191
"""
192+
return _reduce_func(f, np.min, dv.mpi.MPI.MIN)
193+
191194

195+
def mmax(f):
196+
"""
197+
Retrieve the maximum.
192198
193-
mmin = lambda f: _reduce_func(f, np.min, dv.mpi.MPI.MIN)
194-
mmin.__doc__ = red_doc('min')
195-
mmax = lambda f: _reduce_func(f, np.max, dv.mpi.MPI.MAX)
196-
mmax.__doc__ = red_doc('max')
199+
Parameters
200+
----------
201+
f : array_like or Function
202+
Input operand.
203+
"""
204+
return _reduce_func(f, np.max, dv.mpi.MPI.MAX)
197205

198206

199207
@dv.switchconfig(log_level='ERROR')

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ extras = { file = ["requirements-optional.txt"] }
6464

6565
[tool.setuptools.packages.find]
6666
where = ["."]
67-
exclude = ["docs", "tests", "examples"]
68-
67+
exclude = ["binder", "docker", "docs", "tests", "examples"]
6968

7069
[tool.setuptools_scm]
7170
fallback_version = "0+untagged"

0 commit comments

Comments
 (0)