File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1717unittest :
1818 python -m unittest discover -s test
1919
20- install : build
21- python setup.py install
20+ # using python setup.py deploys as .egg, causing the model file not found
21+ # using pip install deploys as a directory, so the model file can be found
22+ # install: build
23+ # python setup.py install
2224
2325install-pip : build
2426 pip install .
27+
28+ install : install-pip
Original file line number Diff line number Diff line change @@ -147,7 +147,6 @@ def get_and_union_features(features):
147147 else :
148148 return features
149149
150-
151150def load_pickled_model (filename , dirname = None ):
152151 """
153152 Load a pickled ``Extractor`` model from disk.
@@ -162,7 +161,7 @@ def load_pickled_model(filename, dirname=None):
162161 :class:`dragnet.extractor.Extractor`
163162 """
164163 if dirname is None :
165- pkg_filename = pkgutil .get_loader ('dragnet' ).get_filename ()
164+ pkg_filename = pkgutil .get_loader ('dragnet' ).get_filename ('dragnet' )
166165 pkg_dirname = os .path .dirname (pkg_filename )
167166 dirname = os .path .join (pkg_dirname , 'pickled_models' , model_path )
168167 filepath = os .path .join (dirname , filename )
Original file line number Diff line number Diff line change 2323
2424import os .path
2525import lxml
26+ import sys
2627
2728from setuptools import setup
2829from numpy import get_include
@@ -51,7 +52,7 @@ def find_libxml2_include():
5152 Extension ('dragnet.features._readability' ,
5253 sources = ["dragnet/features/_readability.pyx" ],
5354 include_dirs = [get_include ()],
54- extra_compile_args = ['-std=c++0x' ] ,
55+ extra_compile_args = ['-std=c++11' ] + ([ '-mmacosx-version-min=10.9' ] if sys . platform . startswith ( "darwin" ) else []) ,
5556 language = "c++" ),
5657 Extension ('dragnet.features._kohlschuetter' ,
5758 sources = ["dragnet/features/_kohlschuetter.pyx" ],
You can’t perform that action at this time.
0 commit comments