Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calibre: update to 5.14.0. #29744

Merged
merged 2 commits into from Apr 6, 2021
Merged

calibre: update to 5.14.0. #29744

merged 2 commits into from Apr 6, 2021

Conversation

skmpz
Copy link
Contributor

@skmpz skmpz commented Mar 25, 2021

General

Have the results of the proposed changes been tested?

  • I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
  • I generally don't use the affected packages but briefly tested this PR

@skmpz
Copy link
Contributor Author

skmpz commented Mar 25, 2021

Didn't get py7zr and pyannotate checks to pass. Any help would be appreciated.

@skmpz skmpz force-pushed the calibre-5.13.0 branch 2 times, most recently from edb5a42 to 7f1c99e Compare March 25, 2021 08:56
@ericonr
Copy link
Member

ericonr commented Mar 25, 2021

I went to check the changelog and got a 404, can you find an up to date link?

I wanted to check if those new packages are strictly necessary or just additional stuff.

@skmpz skmpz force-pushed the calibre-5.13.0 branch 2 times, most recently from 46771a4 to 53584f4 Compare March 25, 2021 17:20
@skmpz
Copy link
Contributor Author

skmpz commented Mar 25, 2021

updated the changelog.. Maybe we can add them only on checkdepends?

Copy link
Member

@ericonr ericonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth it updating directly to .14 now as well.

@@ -0,0 +1,15 @@
# Template file for 'python3-cchardet'
pkgname=python3-cchardet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem strictly necessary from what I'm looking:

https://github.com/kovidgoyal/calibre/blob/5d126692f8c35a9a246795ea4757757f01b1e35f/src/calibre/ebooks/chardet.py#L126

It just defaults to a configured encoding if the module can't be imported. But since you already made the new package, I think it's fine to add directly as a dependency, no need to install only for checks.

@@ -0,0 +1,16 @@
# Template file for 'python3-py7zr'
pkgname=python3-py7zr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ok to add as well.

revision=1
wrksrc="py7zr-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools python3-pip python3-pycryptodome python3-pyannotate"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't have pip here, can you show the error you got without it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=> python3-py7zr-0.11.3_1: running do_build ...
/usr/lib/python3.9/site-packages/setuptools/dist.py:634: UserWarning: Usage of dash-separated 'max-line-length' will not be supported in future versions. Please use the underscore name 'max_line_length' instead
  warnings.warn(
WARNING: The wheel package is not available.
/usr/bin/python3: No module named pip
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmphi1lzhxq', '--quiet', 'pep517']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/py7zr-0.11.3/setup.py", line 5, in <module>
    setup(use_scm_version={"local_scheme": "no-local-version"})
  File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 713, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
    dist = best[req.key] = env.best_match(
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
    return installer(requirement)
  File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 772, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmphi1lzhxq', '--quiet', 'pep517']' returned non-zero exit status 1.
=> ERROR: python3-py7zr-0.11.3_1: do_build: 'python3 setup.py build ${make_build_args}' exited with 1
=> ERROR:   in do_build() at common/build-style/python3-module.sh:22

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess is that it can't find wheel so it fallbacks to use pip to install wheel.
You can try replacing python3-setuptools with python3-wheel, maybe it will work

Copy link
Contributor Author

@skmpz skmpz Apr 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tried but doesn't work.. same error

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install_requires =
      texttable
      pycryptodome
      importlib_metadata;python_version<"3.8"
      pyzstd>=0.14.4,<0.15.0
      ppmd-cffi>=0.3.1,<0.4.0
      bcj-cffi>=0.5.0,<0.6.0
      multivolumefile>=0.2.0,<0.3.0
setup_requires =
      setuptools-scm>=3.5.0
      setuptools>=42.0

Try adding python3-setuptools_scm (and remove python3-pip)

Copy link
Contributor Author

@skmpz skmpz Apr 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still same

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't replace python3-setuptools with python3-wheel. You need python3-setuptools_scm and python3-wheel together. Drop python3-pip and you can also drop python3-setuptools because setuptools_scm will pull it in. Be on the lookout for errors related to toml, because some packages that use setuptools_scm also require python3-toml. (Don't add that unless it's really necessary.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried hostmakedepends="python3-setuptools_scm python3-wheel python3-pycryptodome python3-pyannotate" but still get the pip error..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/miurahr/py7zr/blob/2b082f41bd83022a89cd35712840170f137dff0a/pyproject.toml#L2 suggests that you need to add the python3-toml dependency I mentioned to hostmakedepends.

@folliehiyuki
Copy link
Contributor

Test for pyannotate can be enabled. There is only no extra dependency. Same go for cchardet.
Tests for py7zr can be disabled. It needs a lot of pytest stuff that we don't have in the repo.

@skmpz
Copy link
Contributor Author

skmpz commented Apr 4, 2021

Tests for pyannotate are failing (they also need pip/wheel to run)..

======================================================================
ERROR: test_annotate_json_py3 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_annotate_json_py3
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/pyannotate-1.2.0/pyannotate_tools/fixes/tests/test_annotate_json_py3.py", line 8, in <module>
    from lib2to3.tests.test_fixers import FixerTestCase
ModuleNotFoundError: No module named 'lib2to3.tests'


======================================================================
ERROR: test_annotate_py3 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_annotate_py3
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/pyannotate-1.2.0/pyannotate_tools/fixes/tests/test_annotate_py3.py", line 4, in <module>
    from lib2to3.tests.test_fixers import FixerTestCase
ModuleNotFoundError: No module named 'lib2to3.tests'


======================================================================
ERROR: test_annotate_py2 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_annotate_py2
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/pyannotate-1.2.0/pyannotate_tools/fixes/tests/test_annotate_py2.py", line 4, in <module>
    from lib2to3.tests.test_fixers import FixerTestCase
ModuleNotFoundError: No module named 'lib2to3.tests'


======================================================================
ERROR: test_annotate_json_py2 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_annotate_json_py2
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/pyannotate-1.2.0/pyannotate_tools/fixes/tests/test_annotate_json_py2.py", line 8, in <module>
    from lib2to3.tests.test_fixers import FixerTestCase
ModuleNotFoundError: No module named 'lib2to3.tests'


======================================================================
ERROR: pyannotate_tools.fixes.tests.test_annotate_json_py2 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: pyannotate_tools.fixes.tests.test_annotate_json_py2
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/builddir/pyannotate-1.2.0/pyannotate_tools/fixes/tests/test_annotate_json_py2.py", line 8, in <module>
    from lib2to3.tests.test_fixers import FixerTestCase
ModuleNotFoundError: No module named 'lib2to3.tests'


======================================================================
ERROR: pyannotate_tools.fixes.tests.test_annotate_json_py3 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: pyannotate_tools.fixes.tests.test_annotate_json_py3
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/builddir/pyannotate-1.2.0/pyannotate_tools/fixes/tests/test_annotate_json_py3.py", line 8, in <module>
    from lib2to3.tests.test_fixers import FixerTestCase
ModuleNotFoundError: No module named 'lib2to3.tests'


======================================================================
ERROR: pyannotate_tools.fixes.tests.test_annotate_py2 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: pyannotate_tools.fixes.tests.test_annotate_py2
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/builddir/pyannotate-1.2.0/pyannotate_tools/fixes/tests/test_annotate_py2.py", line 4, in <module>
    from lib2to3.tests.test_fixers import FixerTestCase
ModuleNotFoundError: No module named 'lib2to3.tests'


======================================================================
ERROR: pyannotate_tools.fixes.tests.test_annotate_py3 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: pyannotate_tools.fixes.tests.test_annotate_py3
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/builddir/pyannotate-1.2.0/pyannotate_tools/fixes/tests/test_annotate_py3.py", line 4, in <module>
    from lib2to3.tests.test_fixers import FixerTestCase
ModuleNotFoundError: No module named 'lib2to3.tests'


----------------------------------------------------------------------
Ran 86 tests in 0.063s

FAILED (errors=8)
Test failed: <unittest.runner.TextTestResult run=86 errors=8 failures=0>
[52, 'foo,', 32]
[52, 32]
52
1
tada
1
error: Test failed: <unittest.runner.TextTestResult run=86 errors=8 failures=0>
=> ERROR: python3-pyannotate-1.2.0_1: do_check: 'python3 setup.py ${make_check_target} ${make_check_args}' exited with 1
=> ERROR:   in do_check() at common/build-style/python3-module.sh:39

@skmpz skmpz changed the title calibre: update to 5.13.0. calibre: update to 5.14.0. Apr 4, 2021
@skmpz
Copy link
Contributor Author

skmpz commented Apr 4, 2021

updated calibre to 5.14.0.. i686 build segfaults for python3-cchardet.. weird..

cythonize: ['src/cchardet/_cchardet.pyx']
/void-packages/common/build-style/python3-module.sh: line 5: 14801 Segmentation fault      python3 setup.py build ${make_build_args}
=> ERROR: python3-cchardet-2.1.7_1: do_build: 'python3 setup.py build ${make_build_args}' exited with 139
=> ERROR:   in do_build() at common/build-style/python3-module.sh:22

@ericonr
Copy link
Member

ericonr commented Apr 4, 2021

Looks like a python issue, appeared in https://build.voidlinux.org/builders/i686_builder/builds/31605/steps/shell_3/logs/stdio as well.

revision=1
wrksrc="py7zr-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools python3-pip python3-pycryptodome python3-pyannotate"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/miurahr/py7zr/blob/2b082f41bd83022a89cd35712840170f137dff0a/pyproject.toml#L2 suggests that you need to add the python3-toml dependency I mentioned to hostmakedepends.

wrksrc="py7zr-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools python3-pip python3-pycryptodome python3-pyannotate"
depends="python3-pycryptodome python3-texttable"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahesford I already tried adding python3-toml as well.. I still get the same error..
hostmakedepends="python3-setuptools_scm python3-wheel python3-toml python3-pycryptodome python3-pyannotate"..

About the stuff missing from depends, I'll add them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now that I've checked, most of those packages are not available in the repos as well..

      pyzstd>=0.14.4,<0.15.0
      ppmd-cffi>=0.3.1,<0.4.0
      bcj-cffi>=0.5.0,<0.6.0
      multivolumefile>=0.2.0,<0.3.0

srcpkgs/python3-py7zr/template Outdated Show resolved Hide resolved
@skmpz skmpz changed the title calibre: update to 5.14.0. [WIP] calibre: update to 5.14.0. Apr 5, 2021
@skmpz skmpz force-pushed the calibre-5.13.0 branch 3 times, most recently from b5d9099 to 247e8c4 Compare April 6, 2021 05:11
@skmpz
Copy link
Contributor Author

skmpz commented Apr 6, 2021

ok so I changed py7zr to latest version.. seems that python3-setuptools_scm is enough for building and pyannotate is not needed.. The thing is that some dependencies of py7zr are missing like https://pypi.org/project/ppmd-cffi/ (still in beta version) which also cause calibre 7z suite tests to fail, so I disabled it for now..
I'll try to get

pyzstd>=0.14.4,<0.15.0
ppmd-cffi>=0.3.1,<0.4.0
bcj-cffi>=0.5.0,<0.6.0
multivolumefile>=0.2.0,<0.3.0 

added as well.

@ericonr
Copy link
Member

ericonr commented Apr 6, 2021

@skmpz if you want to simplify matters, we can try to disable only the py7zr part of tests and not package it for now?

@skmpz
Copy link
Contributor Author

skmpz commented Apr 6, 2021

@skmpz if you want to simplify matters, we can try to disable only the py7zr part of tests and not package it for now?

I guess that's what we have now.. py7zr tests disabled, as well as 7z test suite of caibre (which needs ppmd-cffi)

@ericonr
Copy link
Member

ericonr commented Apr 6, 2021

Sorry, I meant not adding py7zr as a new package yet and disabling the 7z part of the calibre testsuite. It's likely the package won't work right without its dependencies.

@skmpz
Copy link
Contributor Author

skmpz commented Apr 6, 2021

done.. added a comment for py7zr dependencies in do_check and removed package from depends.

@skmpz skmpz changed the title [WIP] calibre: update to 5.14.0. calibre: update to 5.14.0. Apr 6, 2021
@ericonr
Copy link
Member

ericonr commented Apr 6, 2021

Great, thanks!

@ericonr ericonr merged commit a176f87 into void-linux:master Apr 6, 2021
@skmpz skmpz deleted the calibre-5.13.0 branch April 30, 2021 15:51
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants