We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e666329 commit 6d4fbd8Copy full SHA for 6d4fbd8
setup.py
@@ -38,6 +38,13 @@
38
39
# Use a provided libarchive else default to hard-coded path.
40
libarchivePrefix = environ.get('LIBARCHIVE_PREFIX')
41
+if libarchivePrefix is None:
42
+ import pathlib
43
+ for i in [ '/usr', '/usr/local', '/opt/local' ]:
44
+ libdir = pathlib.Path(i) / 'lib'
45
+ if list(libdir.glob('libarchive.*')):
46
+ libarchivePrefix = i
47
+ break
48
49
if libarchivePrefix:
50
includePath = libarchivePrefix + '/include'
0 commit comments