Closed dhermes closed 3 years ago
I suspect that one or more of Issue #67, Issue #66, Issue #63, Issue #49 are possibly caused by this shortcoming.
And this issue itself seems to be a duplicate of https://github.com/matthew-brett/delocate/issues/15 and https://github.com/matthew-brett/delocate/issues/12#issuecomment-246536098.
And one more piece of info for this: https://github.com/jwodder/check-wheel-contents will also raise a warning for 'top-level' modules, so it seems to agree with the suggestion here to create a proper package structure.
Another fuller example:
[pycld3/] $ python3 -V
Python 3.8.1
[pycld3/] $ python3 -m venv venv
[pycld3/] $ source ./venv/bin/activate
(venv) [pycld3/] $ python3 -m pip install -U -r requirements-dev.txt
# ...
Successfully installed Cython-0.29.16 Pygments-2.6.1 bleach-3.1.4 certifi-2020.4.5.1 chardet-3.0.4 docutils-0.16 idna-2.9 keyring-21.2.0 pkginfo-1.5.0.1 readme-renderer-25.0 requests-2.23.0 requests-toolbelt-0.9.1 setuptools-46.1.3 six-1.14.0 tqdm-4.45.0 twine-3.1.1 urllib3-1.25.8 webencodings-0.5.1 wheel-0.34.2
(venv) [pycld3/] $ python3 -m pip install delocate
Collecting delocate
# ...
Successfully built delocate
Installing collected packages: delocate
Successfully installed delocate-0.8.0
(venv) [pycld3/] $ python3 setup.py bdist_wheel
Compiling pycld3.pyx because it depends on /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/lib/python3.8/site-packages/Cython/Includes/libcpp/vector.pxd.
[1/1] Cythonizing pycld3.pyx
running bdist_wheel
running build
Running protoc sentence.proto feature_extractor.proto task_spec.proto --cpp_out=/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/
running build_ext
building 'cld3' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c pycld3.cpp -o build/temp.macosx-10.15-x86_64-3.8/pycld3.o -std=c++11 -stdlib=libc++
pycld3.cpp:3523:3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0, /*tp_print*/
^
/Users/brad/.pyenv/versions/3.8.1/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/Users/brad/.pyenv/versions/3.8.1/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
1 warning generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/base.cc -o build/temp.macosx-10.15-x86_64-3.8/src/base.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/cld_3/protos/feature_extractor.pb.cc -o build/temp.macosx-10.15-x86_64-3.8/src/cld_3/protos/feature_extractor.pb.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/cld_3/protos/sentence.pb.cc -o build/temp.macosx-10.15-x86_64-3.8/src/cld_3/protos/sentence.pb.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/cld_3/protos/task_spec.pb.cc -o build/temp.macosx-10.15-x86_64-3.8/src/cld_3/protos/task_spec.pb.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/embedding_feature_extractor.cc -o build/temp.macosx-10.15-x86_64-3.8/src/embedding_feature_extractor.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/embedding_network.cc -o build/temp.macosx-10.15-x86_64-3.8/src/embedding_network.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/feature_extractor.cc -o build/temp.macosx-10.15-x86_64-3.8/src/feature_extractor.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/feature_types.cc -o build/temp.macosx-10.15-x86_64-3.8/src/feature_types.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/fml_parser.cc -o build/temp.macosx-10.15-x86_64-3.8/src/fml_parser.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/lang_id_nn_params.cc -o build/temp.macosx-10.15-x86_64-3.8/src/lang_id_nn_params.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/language_identifier_features.cc -o build/temp.macosx-10.15-x86_64-3.8/src/language_identifier_features.o -std=c++11 -stdlib=libc++
In file included from src/language_identifier_features.cc:16:
In file included from /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/language_identifier_features.h:21:
In file included from /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/feature_extractor.h:47:
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/registry.h:221:40: warning: instantiation of variable
'chrome_lang_id::RegisterableClass<chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence> >::registry_' required here, but no definition is
available [-Wundefined-var-template]
static Registry *registry() { return registry_; }
^
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/feature_extractor.h:369:60: note: in instantiation of member function
'chrome_lang_id::RegisterableClass<chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence> >::registry' requested here
const char *RegistryName() const override { return Self::registry()->name; }
^
src/language_identifier_features.cc:43:37: note: in instantiation of member function
'chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence>::RegistryName' requested here
void ContinuousBagOfNgramsFunction::Setup(TaskContext *context) {
^
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/registry.h:225:20: note: forward declaration of template entity is here
static Registry *registry_;
^
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/registry.h:221:40: note: add an explicit instantiation declaration to suppress this warning if
'chrome_lang_id::RegisterableClass<chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence> >::registry_' is explicitly instantiated in another
translation unit
static Registry *registry() { return registry_; }
^
1 warning generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/nnet_language_identifier.cc -o build/temp.macosx-10.15-x86_64-3.8/src/nnet_language_identifier.o -std=c++11 -stdlib=libc++
In file included from src/nnet_language_identifier.cc:16:
In file included from /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/nnet_language_identifier.h:22:
In file included from /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/embedding_feature_extractor.h:23:
In file included from /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/feature_extractor.h:47:
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/registry.h:221:40: warning: instantiation of variable
'chrome_lang_id::RegisterableClass<chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence> >::registry_' required here, but no definition is
available [-Wundefined-var-template]
static Registry *registry() { return registry_; }
^
src/nnet_language_identifier.cc:131:29: note: in instantiation of member function
'chrome_lang_id::RegisterableClass<chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence> >::registry' requested here
if (WholeSentenceFeature::registry() == nullptr) {
^
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/registry.h:225:20: note: forward declaration of template entity is here
static Registry *registry_;
^
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/registry.h:221:40: note: add an explicit instantiation declaration to suppress this warning if
'chrome_lang_id::RegisterableClass<chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence> >::registry_' is explicitly instantiated in another
translation unit
static Registry *registry() { return registry_; }
^
1 warning generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/registry.cc -o build/temp.macosx-10.15-x86_64-3.8/src/registry.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/relevant_script_feature.cc -o build/temp.macosx-10.15-x86_64-3.8/src/relevant_script_feature.o -std=c++11 -stdlib=libc++
In file included from src/relevant_script_feature.cc:16:
In file included from /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/relevant_script_feature.h:19:
In file included from /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/feature_extractor.h:47:
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/registry.h:221:40: warning: instantiation of variable
'chrome_lang_id::RegisterableClass<chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence> >::registry_' required here, but no definition is
available [-Wundefined-var-template]
static Registry *registry() { return registry_; }
^
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/feature_extractor.h:369:60: note: in instantiation of member function
'chrome_lang_id::RegisterableClass<chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence> >::registry' requested here
const char *RegistryName() const override { return Self::registry()->name; }
^
src/relevant_script_feature.cc:33:29: note: in instantiation of member function 'chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence>::RegistryName'
requested here
void RelevantScriptFeature::Setup(TaskContext *context) {
^
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/registry.h:225:20: note: forward declaration of template entity is here
static Registry *registry_;
^
/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/registry.h:221:40: note: add an explicit instantiation declaration to suppress this warning if
'chrome_lang_id::RegisterableClass<chrome_lang_id::FeatureFunction<chrome_lang_id::Sentence> >::registry_' is explicitly instantiated in another
translation unit
static Registry *registry() { return registry_; }
^
1 warning generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/script_span/fixunicodevalue.cc -o build/temp.macosx-10.15-x86_64-3.8/src/script_span/fixunicodevalue.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/script_span/generated_entities.cc -o build/temp.macosx-10.15-x86_64-3.8/src/script_span/generated_entities.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/script_span/generated_ulscript.cc -o build/temp.macosx-10.15-x86_64-3.8/src/script_span/generated_ulscript.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/script_span/getonescriptspan.cc -o build/temp.macosx-10.15-x86_64-3.8/src/script_span/getonescriptspan.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/script_span/offsetmap.cc -o build/temp.macosx-10.15-x86_64-3.8/src/script_span/offsetmap.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/script_span/text_processing.cc -o build/temp.macosx-10.15-x86_64-3.8/src/script_span/text_processing.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/script_span/utf8statetable.cc -o build/temp.macosx-10.15-x86_64-3.8/src/script_span/utf8statetable.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/sentence_features.cc -o build/temp.macosx-10.15-x86_64-3.8/src/sentence_features.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/task_context.cc -o build/temp.macosx-10.15-x86_64-3.8/src/task_context.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/task_context_params.cc -o build/temp.macosx-10.15-x86_64-3.8/src/task_context_params.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/unicodetext.cc -o build/temp.macosx-10.15-x86_64-3.8/src/unicodetext.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/utils.cc -o build/temp.macosx-10.15-x86_64-3.8/src/utils.o -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/src/cld_3/protos/ -I/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/include -I/Users/brad/.pyenv/versions/3.8.1/include/python3.8 -c src/workspace.cc -o build/temp.macosx-10.15-x86_64-3.8/src/workspace.o -std=c++11 -stdlib=libc++
clang++ -bundle -undefined dynamic_lookup -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/brad/.pyenv/versions/3.8.1/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/brad/.pyenv/versions/3.8.1/lib build/temp.macosx-10.15-x86_64-3.8/pycld3.o build/temp.macosx-10.15-x86_64-3.8/src/base.o build/temp.macosx-10.15-x86_64-3.8/src/cld_3/protos/feature_extractor.pb.o build/temp.macosx-10.15-x86_64-3.8/src/cld_3/protos/sentence.pb.o build/temp.macosx-10.15-x86_64-3.8/src/cld_3/protos/task_spec.pb.o build/temp.macosx-10.15-x86_64-3.8/src/embedding_feature_extractor.o build/temp.macosx-10.15-x86_64-3.8/src/embedding_network.o build/temp.macosx-10.15-x86_64-3.8/src/feature_extractor.o build/temp.macosx-10.15-x86_64-3.8/src/feature_types.o build/temp.macosx-10.15-x86_64-3.8/src/fml_parser.o build/temp.macosx-10.15-x86_64-3.8/src/lang_id_nn_params.o build/temp.macosx-10.15-x86_64-3.8/src/language_identifier_features.o build/temp.macosx-10.15-x86_64-3.8/src/nnet_language_identifier.o build/temp.macosx-10.15-x86_64-3.8/src/registry.o build/temp.macosx-10.15-x86_64-3.8/src/relevant_script_feature.o build/temp.macosx-10.15-x86_64-3.8/src/script_span/fixunicodevalue.o build/temp.macosx-10.15-x86_64-3.8/src/script_span/generated_entities.o build/temp.macosx-10.15-x86_64-3.8/src/script_span/generated_ulscript.o build/temp.macosx-10.15-x86_64-3.8/src/script_span/getonescriptspan.o build/temp.macosx-10.15-x86_64-3.8/src/script_span/offsetmap.o build/temp.macosx-10.15-x86_64-3.8/src/script_span/text_processing.o build/temp.macosx-10.15-x86_64-3.8/src/script_span/utf8statetable.o build/temp.macosx-10.15-x86_64-3.8/src/sentence_features.o build/temp.macosx-10.15-x86_64-3.8/src/task_context.o build/temp.macosx-10.15-x86_64-3.8/src/task_context_params.o build/temp.macosx-10.15-x86_64-3.8/src/unicodetext.o build/temp.macosx-10.15-x86_64-3.8/src/utils.o build/temp.macosx-10.15-x86_64-3.8/src/workspace.o -lprotobuf -o build/lib.macosx-10.15-x86_64-3.8/cld3.cpython-38-darwin.so -stdlib=libc++
installing to build/bdist.macosx-10.15-x86_64/wheel
running install
running install_lib
creating build/bdist.macosx-10.15-x86_64/wheel
copying build/lib.macosx-10.15-x86_64-3.8/cld3.cpython-38-darwin.so -> build/bdist.macosx-10.15-x86_64/wheel
running install_egg_info
running egg_info
writing pycld3.egg-info/PKG-INFO
writing dependency_links to pycld3.egg-info/dependency_links.txt
writing top-level names to pycld3.egg-info/top_level.txt
reading manifest file 'pycld3.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching '.github/'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
writing manifest file 'pycld3.egg-info/SOURCES.txt'
Copying pycld3.egg-info to build/bdist.macosx-10.15-x86_64/wheel/pycld3-0.20-py3.8.egg-info
running install_scripts
creating build/bdist.macosx-10.15-x86_64/wheel/pycld3-0.20.dist-info/WHEEL
creating 'dist/pycld3-0.20-cp38-cp38-macosx_10_15_x86_64.whl' and adding 'build/bdist.macosx-10.15-x86_64/wheel' to it
adding 'cld3.cpython-38-darwin.so'
adding 'pycld3-0.20.dist-info/LICENSE'
adding 'pycld3-0.20.dist-info/METADATA'
adding 'pycld3-0.20.dist-info/WHEEL'
adding 'pycld3-0.20.dist-info/top_level.txt'
adding 'pycld3-0.20.dist-info/RECORD'
removing build/bdist.macosx-10.15-x86_64/wheel
(venv) [pycld3/] $ brew --prefix protobuf
/usr/local/opt/protobuf
(venv) [pycld3/] $ ls /usr/local/opt/protobuf/lib
libprotobuf-lite.22.dylib libprotobuf.22.dylib libprotoc.22.dylib pkgconfig
libprotobuf-lite.a libprotobuf.a libprotoc.a python3.7
libprotobuf-lite.dylib libprotobuf.dylib libprotoc.dylib
(venv) [pycld3/] $ delocate-listdeps --all ./dist/pycld3-0.20-cp38-cp38-macosx_10_15_x86_64.whl
/usr/lib/libSystem.B.dylib
/usr/lib/libc++.1.dylib
/usr/local/Cellar/protobuf/3.11.4/lib/libprotobuf.22.dylib
(venv) [pycld3/] $ delocate-wheel -w fixed_wheels -v --require-archs='x86_64' ./dist/pycld3-0.20-cp38-cp38-macosx_10_15_x86_64.whl
Fixing: ./dist/pycld3-0.20-cp38-cp38-macosx_10_15_x86_64.whl
(venv) [pycld3/] $ python3 -m pip install --force-reinstall ./fixed_wheels/pycld3-0.20-cp38-cp38-macosx_10_15_x86_64.whl
Processing ./fixed_wheels/pycld3-0.20-cp38-cp38-macosx_10_15_x86_64.whl
Installing collected packages: pycld3
Found existing installation: pycld3 0.20
Not uninstalling pycld3 at /Users/brad/Scripts/python/projects/bsolomon1124/pycld3, outside environment /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv
Can't uninstall 'pycld3'. No files were found to uninstall.
Successfully installed pycld3-0.20
(venv) [~/] $ brew uninstall protobuf
Uninstalling /usr/local/Cellar/protobuf/3.11.4... (268 files, 19.6MB)
(venv) [~/] $ python3 -c 'import cld3; print(cld3.get_language("影響包含對氣候的變化以及自然資源的枯竭程度"))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: dlopen(/Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/lib/python3.8/site-packages/cld3.cpython-38-darwin.so, 2): Library not loaded: /usr/local/opt/protobuf/lib/libprotobuf.22.dylib
Referenced from: /Users/brad/Scripts/python/projects/bsolomon1124/pycld3/venv/lib/python3.8/site-packages/cld3.cpython-38-darwin.so
Reason: image not found
(venv) [pycld3/] $ unzip dist/pycld3-0.20-cp38-cp38-macosx_10_15_x86_64.whl
Archive: dist/pycld3-0.20-cp38-cp38-macosx_10_15_x86_64.whl
inflating: cld3.cpython-38-darwin.so
inflating: pycld3-0.20.dist-info/LICENSE
inflating: pycld3-0.20.dist-info/METADATA
inflating: pycld3-0.20.dist-info/WHEEL
inflating: pycld3-0.20.dist-info/top_level.txt
inflating: pycld3-0.20.dist-info/RECORD
(venv) [pycld3/] $ ls
CLD3_README.md TODO misc requirements-dev.txt
CMakeLists.txt build model.png setup.cfg
LICENSE build-wheels.sh publish.sh setup.py
LICENSES cld3.cpython-38-darwin.so pycld3-0.20.dist-info src
MANIFEST.in dist pycld3.cpp test_pycld3.py
Makefile docker pycld3.egg-info venv
README.md fixed_wheels pycld3.pyx
(venv) [pycld3/] $ otool -L cld3.cpython-38-darwin.so
cld3.cpython-38-darwin.so:
/usr/local/opt/protobuf/lib/libprotobuf.22.dylib (compatibility version 23.0.0, current version 23.4.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.7.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
In this small project pillow_heif can I change anything to make delocate work?
Yesterday spend 3+ hours, but without any success(tried create everywhere init.py , import empty python file named libheif
and other solutions).
delocate-listdeps
and otool
shows that project depends on /usr/local/Cellar/libheif/1.12.0/lib/libheif.1.dylib
(_libheif_cffi.abi3.so wants to import it) , but delocate-wheel
didnt want copied it.
During build got generated _libheif_cffi.abi3.so
inside root package dir and nothing else after wheelbuild :(
If anyone will able to help(even with advice), i will be so happy
Ok, thats was my bad, i see how badly looks situation when my module installs .so
file in root of site-packages
.
Understanded how to change this and now all works perfectly.
Sorry for bothering
In
delocate_wheel()
, the call tofind_package_dirs(wheel_dir)
returns an empty set if the wheel simply contains a module (rather than a package). For example: