zbar lite package only support scan image and recognize barcode
Project description
This package is a part of ZBAR, only supports image related functions. For now , it is only designed for Python.
It is recommended for you to run cmd below first.
cd zbar
autoreconf -vfi
./configure --without-java --without-gtk \
--without-qt --without-imagemagick --disable-video --without-python
the host
you should fill with something according to your own compiler.
then run
sh preparation.sh
before build, you should make sure that your gcc compiler is fit with your OS.
you can install gcc build env from https://sourceforge.net/projects/mingw-w64/files/
for windows
Notice that mingw64 and mingw-w64 is not the same thing.
I select x86_64-win32-seh
to build my wheel.
python setup.py build -c mingw32
to build whl
python setup.py bdist_wheel
to install
python setup.py install
Some errors you could meet:
cannot find -lmsvcr140
if you build this whl in Windows with python setup.py build_ext --compiler=mingw32
,
you may meet an error that cannot find -lmsvcr140
, as you can see in https://stackoverflow.com/questions/43873604/where-is-msvcr140-dll-does-it-exist.
There are two solutions:
- modify func
get_msvcr
indistutils.cygwinccompiler
to
def get_msvcr():
"""Include the appropriate MSVC runtime library if Python was built
with MSVC 7.0 or later.
"""
msc_pos = sys.version.find('MSC v.')
if msc_pos != -1:
msc_ver = sys.version[msc_pos+6:msc_pos+10]
if msc_ver == '1300':
# MSVC 7.0
return ['msvcr70']
elif msc_ver == '1310':
# MSVC 7.1
return ['msvcr71']
elif msc_ver == '1400':
# VS2005 / MSVC 8.0
return ['msvcr80']
elif msc_ver == '1500':
# VS2008 / MSVC 9.0
return ['msvcr90']
elif msc_ver == '1600':
# VS2010 / MSVC 10.0
return ['msvcr100']
elif int(msc_ver) >= 1900:
# VS2015 / MSVC 14.0
return ['vcruntime140']
else:
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
- modify
Mingw32CCompiler
, commentself.dll_libraries = get_msvcr()
For more documents you can visit https://github.com/mchehab/zbar/tree/master/python
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for zbar_lite-0.23.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4294bf780ef0c39d739012e7f8875c8efe52f8facb43252d5ceabaf26f672c36 |
|
MD5 | b888b0314db50521233600de0db33864 |
|
BLAKE2b-256 | e23e6ef63b0b2a40f49b7c6b1396674546f043561956973121f98cba8da37500 |