Skip to content

Commit

Permalink
Merge pull request #218 from lpsinger/run_pykg_config_distribution
Browse files Browse the repository at this point in the history
Adapt to some changes in behavior of pkg_resources.run_script
  • Loading branch information
zonca committed Jan 13, 2015
2 parents b103f64 + 1aa8c44 commit b65336c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ healpy/src/_pixelfunc.cpp
healpy/src/_sphtools.cpp
healpy.egg-info
dist
.eggs
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exclude cfitsio/*pdf cfitsio/*ps cfitsio/*doc cfitsio/*tex
prune cfitsio/docs
exclude *.so
exclude *.a
include COPYING CITATION INSTALL.rst README.rst MANIFEST.in CHANGELOG.rst ez_setup.py pykg_config.py
include COPYING CITATION INSTALL.rst README.rst MANIFEST.in CHANGELOG.rst ez_setup.py run_pykg_config.py
include healpy/src/_healpy_utils.h
include healpy/src/_query_disc.cpp
include healpy/src/_sphtools.cpp
Expand Down
3 changes: 0 additions & 3 deletions pykg_config.py

This file was deleted.

6 changes: 6 additions & 0 deletions run_pykg_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Helper to run pykg-config, whether it is installed or lives in a zipped egg.
from setuptools import Distribution
from pkg_resources import run_script
requirement = 'pykg-config >= 1.2.0'
Distribution().fetch_build_eggs(requirement)
run_script(requirement, 'pykg-config.py')
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def check_output(*popenargs, **kwargs):
raise ValueError
log.warn('pkg-config is not installed, falling back to pykg-config')
setup_requires = ['pykg-config >= 1.2.0']
os.environ['PKG_CONFIG'] = sys.executable + ' ' + os.path.abspath('pykg_config.py')
os.environ['PKG_CONFIG'] = sys.executable + ' ' + os.path.abspath('run_pykg_config.py')


class build_external_clib(build_clib):
Expand Down

0 comments on commit b65336c

Please sign in to comment.