Skip to content

Commit

Permalink
Add setuptools>=38 as a build_dep.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Feb 19, 2018
1 parent 4a466eb commit 5e3ff5d
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 31 deletions.
21 changes: 11 additions & 10 deletions conda_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# The requirements packages that can be installed with
# conda install -y -c conda-forge --file conda_requirements.txt
numpy >= 1.13
future >= 0.15
astropy >= 2.0
pybind11 >= 2.2
pip >= 9.0
gcc >= 4.8
fftw >= 3.3
eigen >= 3.3
setuptools>=38
numpy>=1.13
future>=0.15
astropy>=2.0
pybind11>=2.2
pip>=9.0
gcc>=4.8
fftw>=3.3
eigen>=3.3

# Not technically required, but useful.
pyyaml >= 3.12
pandas >= 0.20
pyyaml>=3.12
pandas>=0.20
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build-system]
requires = ["setuptools>=38", "pybind11>=2.2"]
21 changes: 11 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
# These are in conda_requirements.txt. If using that, you may prefer to do
# conda install -c conda-forge --file conda_requirements.txt
# prior to running pip install -r requirements.txt
eigency >= 1.77
numpy >= 1.13
future >= 0.15
astropy >= 2.0
pybind11 >= 2.2
pip >= 9.0
setuptools>=38
eigency>=1.77
numpy>=1.13
future>=0.15
astropy>=2.0
pybind11>=2.2
pip>=9.0

# Not technically required, but useful.
pyyaml >= 3.12
pandas >= 0.20
pyyaml>=3.12
pandas>=0.20

# This is not in conda. Let pip install these.
LSSTDESC.Coord >= 1.0.5
starlink-pyast >= 3.9.0 # Also not required, but useful.
LSSTDESC.Coord>=1.0.5
starlink-pyast>=3.9.0 # Also not required, but useful.
32 changes: 21 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@
import ctypes
import types

from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
from setuptools.command.build_clib import build_clib
from setuptools.command.install import install
from setuptools.command.install_scripts import install_scripts
from setuptools.command.easy_install import easy_install
from setuptools.command.test import test
import setuptools
print("Using setuptools version",setuptools.__version__)
try:
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
from setuptools.command.build_clib import build_clib
from setuptools.command.install import install
from setuptools.command.install_scripts import install_scripts
from setuptools.command.easy_install import easy_install
from setuptools.command.test import test
import setuptools
print("Using setuptools version",setuptools.__version__)
except ImportError:
print()
print("****")
print(" Installation requires setuptools version >= 38.")
print(" Please upgrade or install with pip install -U setuptools")
print("****")
print()
raise

print('Python version = ',sys.version)
py_version = "%d.%d"%sys.version_info[0:2] # we check things based on the major.minor version.
Expand Down Expand Up @@ -403,6 +412,7 @@ def add_dirs(builder, output=False):
# Finally, add pybind11's include dir
import pybind11
print('PyBind11 is version ',pybind11.__version__)
#print(pybind11.__file__)
# Include both the standard location and the --user location, since it's hard to tell
# which one is the right choice.
builder.include_dirs.append(pybind11.get_include(user=True))
Expand Down Expand Up @@ -594,7 +604,7 @@ def run_tests(self):
py_sources,
undef_macros = undef_macros)

build_dep = ['pybind11>=2.2']
build_dep = ['setuptools>=38', 'pybind11>=2.2']
run_dep = ['numpy', 'future', 'astropy', 'LSSTDESC.Coord']
test_dep = ['pytest', 'pytest-xdist', 'pytest-timeout', 'scipy']

Expand Down Expand Up @@ -672,7 +682,7 @@ def run_tests(self):
libraries=[lib],
ext_modules=[ext],
setup_requires=build_dep,
install_requires=run_dep,
install_requires=build_dep + run_dep,
tests_require=test_dep,
cmdclass = {'build_ext': my_build_ext,
'build_clib': my_build_clib,
Expand Down

0 comments on commit 5e3ff5d

Please sign in to comment.