Comments (4)
peterjc/backports.lzma#11 and python-lz4/python-lz4#76 use package pkgconfig
to simplify this.
from python-chardet.
I tested it as follows:
import pkgconfig
pkg = pkgconfig.parse ('chardet')
libdir.append (pkg['library_dirs'])
incdir.append (pkg['include_dirs'])
However, in the test, an error occurs as follows:
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I[u'/usr/include/chardet'] -I/usr/include/python2.7 -c src/chardet.c -o build/temp.linux-x86_64-2.7/src/chardet.o
src/chardet.c:18:21: fatal error: chardet.h: can not found
#include <chardet.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
When using the PKGConfig module, additional parsing is more required, and the code complexity seems to be higher.
-I[u'/usr/include/chardet'] -> -I/usr/include/chardet
from python-chardet.
That is because each library can have more than one directory for includes and libs. No parsing is needed.
Use
libdir += pkg['library_dirs'])
incdir += pkg['include_dirs'])
from python-chardet.
That is because each library can have more than one directory for includes and libs. No parsing is needed.
Uselibdir += pkg['library_dirs']) incdir += pkg['include_dirs'])
sound good. thanks
from python-chardet.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-chardet.