mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
python includes symlink shortcut
Also remove these versioned provides since we implicitly support that now and tea/cli lost the code that supports this for the provides key at some point. However the pip one we would still need and we don't support that in tea/cli
This commit is contained in:
parent
a7b4df2c99
commit
7f68885ffa
|
@ -42,4 +42,4 @@ test:
|
||||||
|
|
||||||
provides:
|
provides:
|
||||||
- bin/pip
|
- bin/pip
|
||||||
- bin/pip{{deps.python.org.version.major}}
|
#FIXME - bin/pip{{deps.python.org.version.major}}
|
||||||
|
|
|
@ -16,8 +16,6 @@ unpackaged:
|
||||||
|
|
||||||
provides:
|
provides:
|
||||||
- bin/python
|
- bin/python
|
||||||
- bin/python{{version.major}}
|
|
||||||
- bin/python{{version.marketing}}
|
|
||||||
|
|
||||||
interprets:
|
interprets:
|
||||||
extensions: py
|
extensions: py
|
||||||
|
@ -43,7 +41,6 @@ build:
|
||||||
freedesktop.org/pkg-config: ^0.29
|
freedesktop.org/pkg-config: ^0.29
|
||||||
crates.io/semverator: '*'
|
crates.io/semverator: '*'
|
||||||
|
|
||||||
#TODO use the diff
|
|
||||||
#TODO $libdir/_sysconfigdata__darwin_darwin.py contains non-relocatable paths
|
#TODO $libdir/_sysconfigdata__darwin_darwin.py contains non-relocatable paths
|
||||||
script: |
|
script: |
|
||||||
sed -i.bak -e 's|system_lib_dirs = .*|system_lib_dirs = os.getenv("LIBRARY_PATH").split(":")|' ./setup.py
|
sed -i.bak -e 's|system_lib_dirs = .*|system_lib_dirs = os.getenv("LIBRARY_PATH").split(":")|' ./setup.py
|
||||||
|
@ -90,6 +87,12 @@ build:
|
||||||
# chmod -w {{prefix}}/lib/python{{version.marketing}}
|
# chmod -w {{prefix}}/lib/python{{version.marketing}}
|
||||||
# ^^ makes rm -rf ~/.tea/python.org on macOS fail
|
# ^^ makes rm -rf ~/.tea/python.org on macOS fail
|
||||||
|
|
||||||
|
# some stuff expects python includes to be accessible without the prefix
|
||||||
|
cd include
|
||||||
|
mv python{{version.marketing}}/* .
|
||||||
|
rmdir python{{version.marketing}}
|
||||||
|
ln -s . python{{version.marketing}}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
ARGS:
|
ARGS:
|
||||||
- --prefix="{{ prefix }}"
|
- --prefix="{{ prefix }}"
|
||||||
|
@ -120,25 +123,9 @@ build:
|
||||||
OPENSSL_INCLUDES: ${{ deps.openssl.org.prefix }}/include
|
OPENSSL_INCLUDES: ${{ deps.openssl.org.prefix }}/include
|
||||||
OPENSSL_LDFLAGS: -L{{ deps.openssl.org.prefix }}/lib
|
OPENSSL_LDFLAGS: -L{{ deps.openssl.org.prefix }}/lib
|
||||||
|
|
||||||
# required for `setup.py` which is used to detect the libs for python’s modules
|
|
||||||
diff: |
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 85a2b26..4f2f742 100644
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -847,8 +847,8 @@ class PyBuildExt(build_ext):
|
|
||||||
add_dir_to_list(self.compiler.include_dirs,
|
|
||||||
sysconfig.get_config_var("INCLUDEDIR"))
|
|
||||||
|
|
||||||
- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
|
|
||||||
- system_include_dirs = ['/usr/include']
|
|
||||||
+ system_lib_dirs = os.getenv("LIBRARY_PATH").split(":")
|
|
||||||
+ system_include_dirs = os.getenv("CPATH").split(":")
|
|
||||||
# lib_dirs and inc_dirs are used to search for files;
|
|
||||||
# if a file is found in one of those directories, it can
|
|
||||||
# be assumed that no additional -I,-L directives are needed.
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
script: |
|
script: |
|
||||||
# Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions
|
# Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions
|
||||||
# and it can occur that building sqlite silently fails if OSX's sqlite is used.
|
# and it can occur that building sqlite silently fails if OSX's sqlite is used.
|
||||||
|
@ -159,6 +146,10 @@ test:
|
||||||
if which pip; then
|
if which pip; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo '#include <Python.h>' > fixture.c
|
||||||
|
echo '#include <python{{version.major}}.{{version.minor}}/Python.h>' >> fixture.c
|
||||||
|
cc -c fixture.c
|
||||||
fixture: |
|
fixture: |
|
||||||
import dbm
|
import dbm
|
||||||
with dbm.ndbm.open("test", "c") as db:
|
with dbm.ndbm.open("test", "c") as db:
|
||||||
|
|
Loading…
Reference in a new issue