mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
deploy-ng: fixes for FreeBSD
This commit is contained in:
parent
5cf2f92597
commit
1c018f5bdb
@ -750,9 +750,12 @@ class Freezer:
|
|||||||
('.abi{0}.so'.format(sys.version_info[0]), 'rb', 3),
|
('.abi{0}.so'.format(sys.version_info[0]), 'rb', 3),
|
||||||
('.so', 'rb', 3),
|
('.so', 'rb', 3),
|
||||||
]
|
]
|
||||||
else:
|
else: # FreeBSD et al.
|
||||||
print("Unknown platform %s" % (self.platform))
|
self.moduleSuffixes += [
|
||||||
self.moduleSuffixes = imp.get_suffixes()
|
('.cpython-{0}{1}m.so'.format(*sys.version_info), 'rb', 3),
|
||||||
|
('.abi{0}.so'.format(*sys.version_info), 'rb', 3),
|
||||||
|
('.so', 'rb', 3),
|
||||||
|
]
|
||||||
|
|
||||||
def excludeFrom(self, freezer):
|
def excludeFrom(self, freezer):
|
||||||
""" Excludes all modules that have already been processed by
|
""" Excludes all modules that have already been processed by
|
||||||
|
@ -78,7 +78,7 @@ class build_apps(distutils.core.Command):
|
|||||||
whldir = os.path.join(self.build_base, '__whl_cache__')
|
whldir = os.path.join(self.build_base, '__whl_cache__')
|
||||||
abi_tag = pip.pep425tags.get_abi_tag()
|
abi_tag = pip.pep425tags.get_abi_tag()
|
||||||
|
|
||||||
if 'u' in abi_tag and not platform.startswith('manylinux'):
|
if 'u' in abi_tag and (platform.startswith('win') or platform.startswith('macosx')):
|
||||||
abi_tag = abi_tag.replace('u', '')
|
abi_tag = abi_tag.replace('u', '')
|
||||||
|
|
||||||
pip_args = [
|
pip_args = [
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <sys/sysctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -165,7 +168,18 @@ int main(int argc, char *argv[]) {
|
|||||||
wchar_t buffer[2048];
|
wchar_t buffer[2048];
|
||||||
GetModuleFileNameW(NULL, buffer, 2048);
|
GetModuleFileNameW(NULL, buffer, 2048);
|
||||||
runtime = _wfopen(buffer, L"rb");
|
runtime = _wfopen(buffer, L"rb");
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
size_t bufsize = 4096;
|
||||||
|
char buffer[4096];
|
||||||
|
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
|
||||||
|
mib[3] = getpid();
|
||||||
|
if (sysctl(mib, 4, (void *)buffer, &bufsize, NULL, 0) == -1) {
|
||||||
|
perror("sysctl");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
runtime = fopen(buffer, "rb");
|
||||||
#else
|
#else
|
||||||
|
// Let's hope that it was invoked with the executable name as first arg.
|
||||||
runtime = fopen(argv[0], "rb");
|
runtime = fopen(argv[0], "rb");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user