Hi!
I have made a couple of tweaks:
- downloaded the dictionaries into the package
- patched hypenization.py not to cleanup every time and allow this to work in advance:
setup.py hyphenation --hyphenation-url="file://$(CURDIR)/debian/dictionaries/master.tar.gz"
- appended the following steps after build
setup.py iso639
setup.py iso3166
setup.py translations
setup.py gui
setup.py resources
I'm able to build Calibre, but this test fails with the following error:
setup.py test --test-name=dom_load
test_dom_load (calibre.scraper.simple.find_tests.<locals>.TestSimpleWebEngineScraper) ... ERRORTraceback (most recent call last):
File "/<<PKGBUILDDIR>>/setup/run-calibre-worker.py", line 14, in <module>
sys.exit(main())
File "/<<PKGBUILDDIR>>/src/calibre/utils/ipc/worker.py", line 196, in main
exec(sys.argv[-1])
File "<string>", line 1, in <module>
File "/<<PKGBUILDDIR>>/src/calibre/scraper/simple.py", line 28, in worker_main
s = SimpleScraper(source)
File "/<<PKGBUILDDIR>>/src/calibre/scraper/simple_backend.py", line 56, in __init__
profile = create_profile(source)
File "/<<PKGBUILDDIR>>/src/calibre/scraper/simple_backend.py", line 34, in create_profile
ans.setHttpUserAgent(random_common_chrome_user_agent())
File "/<<PKGBUILDDIR>>/src/calibre/utils/random_ua.py", line 44, in random_common_chrome_user_agent
return choose_randomly_by_popularity(tuple(common_chrome_user_agents()))
File "/<<PKGBUILDDIR>>/src/calibre/utils/random_ua.py", line 30, in common_chrome_user_agents
for x in user_agent_data()['common_user_agents']:
File "/<<PKGBUILDDIR>>/src/calibre/utils/random_ua.py", line 14, in user_agent_data
P('user-agent-data.json', data=True, allow_user_override=False))
File "/<<PKGBUILDDIR>>/src/calibre/utils/resources.py", line 89, in get_path
with open(fpath, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/<<PKGBUILDDIR>>/resources/user-agent-data.json'
[0.5 s]
Any idea how to overcome this? Did I miss something?
Hi! url="file: //$(CURDIR) /debian/ dictionaries/ master. tar.gz"
I have made a couple of tweaks:
- downloaded the dictionaries into the package
- patched hypenization.py not to cleanup every time and allow this to work in advance:
setup.py hyphenation --hyphenation-
- appended the following steps after build
setup.py iso639
setup.py iso3166
setup.py translations
setup.py gui
setup.py resources
I'm able to build Calibre, but this test fails with the following error:
setup.py test --test- name=dom_ load
test_dom_load (calibre. scraper. simple. find_tests. <locals> .TestSimpleWebE ngineScraper) ... ERRORTraceback (most recent call last): >>/setup/ run-calibre- worker. py", line 14, in <module> exit(main( )) >>/src/ calibre/ utils/ipc/ worker. py", line 196, in main sys.argv[ -1]) >>/src/ calibre/ scraper/ simple. py", line 28, in worker_main source) >>/src/ calibre/ scraper/ simple_ backend. py", line 56, in __init__ profile( source) >>/src/ calibre/ scraper/ simple_ backend. py", line 34, in create_profile setHttpUserAgen t(random_ common_ chrome_ user_agent( )) >>/src/ calibre/ utils/random_ ua.py", line 44, in random_ common_ chrome_ user_agent randomly_ by_popularity( tuple(common_ chrome_ user_agents( ))) >>/src/ calibre/ utils/random_ ua.py", line 30, in common_ chrome_ user_agents data()[ 'common_ user_agents' ]: >>/src/ calibre/ utils/random_ ua.py", line 14, in user_agent_data user-agent- data.json' , data=True, allow_user_ override= False)) >>/src/ calibre/ utils/resources .py", line 89, in get_path >>/resources/ user-agent- data.json'
File "/<<PKGBUILDDIR
sys.
File "/<<PKGBUILDDIR
exec(
File "<string>", line 1, in <module>
File "/<<PKGBUILDDIR
s = SimpleScraper(
File "/<<PKGBUILDDIR
profile = create_
File "/<<PKGBUILDDIR
ans.
File "/<<PKGBUILDDIR
return choose_
File "/<<PKGBUILDDIR
for x in user_agent_
File "/<<PKGBUILDDIR
P('
File "/<<PKGBUILDDIR
with open(fpath, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/<<PKGBUILDDIR
[0.5 s]
Any idea how to overcome this? Did I miss something?
Thank you!