Commit 66e686af authored by Hanno Schlichting's avatar Hanno Schlichting

Provide local fallback for persistent C header inclusion if the persistent...

Provide local fallback for persistent C header inclusion if the persistent distribution isn't installed. This makes the winbot happy.
parent 7c20693e
......@@ -5,7 +5,8 @@
4.0.1 (unreleased)
------------------
- TBD
- Provide local fallback for persistent C header inclusion if the
persistent distribution isn't installed. This makes the winbot happy.
4.0.0 (2012-10-20)
......
......@@ -29,7 +29,9 @@ README = (open(os.path.join(here, 'README.txt')).read()
open(os.path.join(here, 'CHANGES.txt')).read())
# Include directories for C extensions
# Sniff the location of the headers in 'persistent'.
# Sniff the location of the headers in 'persistent' or fall back
# to local headers in the include sub-directory
class ModuleHeaderDir(object):
......@@ -44,9 +46,13 @@ class ModuleHeaderDir(object):
def __str__(self):
from pkg_resources import require
from pkg_resources import resource_filename
require(self._require_spec)
return os.path.abspath(
resource_filename(self._require_spec, self._where))
from pkg_resources import DistributionNotFound
try:
require(self._require_spec)
path = resource_filename(self._require_spec, self._where)
except DistributionNotFound:
path = os.path.join(here, 'include')
return os.path.abspath(path)
include = [ModuleHeaderDir('persistent')]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment