Skip to content

Commit

Permalink
fixing conda-forge failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jGaboardi committed Feb 24, 2020
1 parent 2d4cf7a commit 9ae18a3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

package = "spaghetti"

# This check resolves conda-forge build failures
# See the link below for original solution
# https://github.com/pydata/xarray/pull/2643/files#diff-2eeaed663bd0d25b7e608891384b7298R29-R30
needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv)
setup_requires = ["pytest-runner"] if needs_pytest else []

# Get __version__ from package/__init__.py
with open(package + "/__init__.py", "r") as f:
exec(f.readline())
Expand Down Expand Up @@ -66,7 +72,7 @@ def setup_package():
download_url="https://pypi.org/project/" + package,
maintainer="James D. Gaboardi",
maintainer_email="[email protected]",
setup_requires=["pytest-runner"],
setup_requires=setup_requires,
tests_require=["pytest"],
keywords="spatial statistics, networks, graphs",
classifiers=[
Expand Down

0 comments on commit 9ae18a3

Please sign in to comment.