#471 Package dandischema
Closed: Fixed 5 months ago by mithunveluri. Opened 3 years ago by ankursinha.

Package dandischema: required by dandi


Metadata Update from @ankursinha:
- Issue marked as blocking: #443

3 years ago

Metadata Update from @ankursinha:
- Issue tagged with: D: Easy, good first issue

3 years ago

This project depends on zarr_checksum, so first packaging dandi/zarr_checksum/

$ fedpkg --release f40 mockbuild
[...]
Package "python3-versioningit-3.1.2-1.fc40.noarch" is already installed.
Package "python3-wheel-1:0.41.2-3.fc40.noarch" is already installed.
No match for argument: python3dist(zarr-checksum)
You can try to add to command line:
  --skip-unavailable to skip unavailable packages

Could not execute mockbuild: Failed to execute command.

Please let me know if we need a new ticket for python-zarr_checksum. I've raised a RHBZ issue for the dependency package of this.

First of all, thanks for working on this.

No need to open a separate issue here in Pagure for the dependency. Ultimately, we want to package dandischema. To get there we need to satisfy the dependencies. So, this becomes part of this ticket.

Regarding your review request:

  • The package should be named python-zarr-checksum in accordance with the Python Naming Guidelines
  • In the review request the link to the spec file points to the file in Copr's git repo. It needs to be a downloadable link for various automation tools to work correctly. Use the link from the build result instead. You can navigate ther via the Builds tab, clicking on the Build ID and then the Chroot Name.
  • You also need to provide a download link for the SRPM, again, for various automation to work correctly. You can get a link from the build results as well.

Once you changed the name of the package and rebuilt it in Copr, edit the summary of the bug to reflect the new name. Then add a new comment providing the links to the spec file and SRPM as you did in the initial comment, like:

Spec URL: ...
SRPM URL: ...

Don't hesitate to ask if anything is unclear.

Metadata Update from @gui1ty:
- Issue assigned to mithunveluri (was: ankursinha)

5 months ago

Thanks for looking into this @gui1ty,

I've modified the Spec, SRPM URLs in the RHBZ issue to include the downloadable URLs.

I did check the package naming guidelines, below is the exception which is true for this package where the upstream project name naturally contains _.

There are a few exceptions to the no underscore _ rule:
httpd, pam, and SDL addon packages are excluded, refer to “Addon Packages (httpd, pam, and SDL)”.
packages that are locale specific, and use the locale in the name are excluded, refer to “Addon Packages (locales)”.
Compat packages where the base package name ends in a digit, refer to “Multiple packages with the same base name”.
packages where the upstream name naturally contains an underscore are excluded from this. Examples of these packages include:
arptables_jf

Also, when I tried to build with python-zarr-checksum, it fails at %pyproject_save_files -L %{pypi_name} possibly as the original downloaded archive (zarr_checksum-0.4.2.tar.gz) has underscore(_) instead of -.

+ /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/python-zarr-checksum-0.4.2-1.fc40.x86_64-pyproject-files --output-modules /builddir/build/BUILD/python-zarr-checksum-0.4.2-1.fc40.x86_64-pyproject-modules --buildroot /builddir/build/BUILDROOT/python-zarr-checksum-0.4.2-1.fc40.x86_64 --sitelib /usr/lib/python3.12/site-packages --sitearch /usr/lib64/python3.12/site-packages --python-version 3.12 --pyproject-record /builddir/build/BUILD/python-zarr-checksum-0.4.2-1.fc40.x86_64-pyproject-record --prefix /usr -L zarr-checksum
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 889, in <module>
    main(cli_args)
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 835, in main
    file_section, module_names = pyproject_save_files_and_modules(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 816, in pyproject_save_files_and_modules
    generate_file_list(paths_dict, globs, include_auto)
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 623, in generate_file_list
    raise ValueError(f"Globs did not match any module: {missed_text}")
ValueError: Globs did not match any module: zarr-checksum
error: Bad exit status from /var/tmp/rpm-tmp.rKjLtl (%install)
    Bad exit status from /var/tmp/rpm-tmp.rKjLtl (%install)

RPM build errors:
Finish: rpmbuild python-zarr-checksum-0.4.2-1.fc40.src.rpm
Finish: build phase for python-zarr-checksum-0.4.2-1.fc40.src.rpm
ERROR: Exception(/home/fedora/python-zarr_checksum/python-zarr-checksum-0.4.2-1.fc40.src.rpm) Config(fedora-40-x86_64) 0 minutes 44 seconds
INFO: Results and/or logs in: /home/fedora/python-zarr_checksum/results_python-zarr-checksum/0.4.2/1.fc40
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
Finish: clean chroot
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M 5b896828300844f8be06c8189708d306 -D /var/lib/mock/fedora-40-x86_64/root -a -u mockbuild --capability=c

Also, checking the source code, it seems like developers used zarr_checksum to import the module. So, this can cause the %tox and %pyproject_check_import checks to fail if we use zarr-checksum.

So, I request you to let me know if we still need to change the package name and re-build. Thanks again.

I've modified the Spec, SRPM URLs in the RHBZ issue to include the downloadable URLs.

Thanks. Though, adding a new comment instead of editing the existing comment, should have triggered an automated review build. More on that later...

I did check the package naming guidelines, below is the exception which is true for this package where the upstream project name naturally contains _.

Well, Python project / module naming is difficult... :wink:

Upstream on PyPI the project is called zarr-checksum. That's also what we refer to as the cannonical project name. There's even an RPM macro which will transform zarr_checksum into zarr-checksum:

$ rpm -E '%{py_dist_name zarr_checksum}'
zarr-checksum

Also, when I tried to build with python-zarr-checksum, it fails at %pyproject_save_files -L %{pypi_name} possibly as the original downloaded archive (zarr_checksum-0.4.2.tar.gz) has underscore(_) instead of -.

Yes. That's to be expected and happens because the importable module is still called zarr_checksum. You can pass the module name as an argument:

%pyproject_save_files -L zarr_checksum

Also, checking the source code, it seems like developers used zarr_checksum to import the module. So, this can cause the %tox and %pyproject_check_import checks to fail if we use zarr-checksum.

It shouldn't since those will use the importable module name, which remains unchanged.

Got it @gui1ty , thank you. Now, I've changed the name and added a new comment in the RHBZ Issue with new Spec, SRPM URLs.

Raised a RHBZ Issue for python-dandischema.
Currently searching for reviewer, will keep this ticket updated with latest status.

Cool, awesome!

I've also added you to the neuro-sig pagure group now @mithunveluri , so you can work with all our pagure repos now.

I could also add you to the neuro-sig packager group if you'd like, but do be aware that as soon as you get added there you start getting notifications from all our 300+ packages :sweat_smile:

https://src.fedoraproject.org/group/neuro-sig

Oh, and please do give the neuro-sig commit access to python-zarr-checksum if you'd like all of us help maintain it together like we do with all our packages. (Settings -> users and groups). You could also add the python-sig to it, they look after all things Python.

Thanks Ankur. For now, pagure group is fine.:sweat_smile: and yes, I've added necessary permissions for python-zarr-checksum allowing neuro-sig.

Metadata Update from @mithunveluri:
- Assignee reset
- Issue unmarked as blocking: #443
- Issue unmarked as depending on: #472
- Issue untagged with: D: Easy, D: Normal, F: Data Analysis, F: Utilities, S: Needs packaging, T: Software, good first issue
- Issue priority set to: None (was: Normal)

5 months ago

Metadata Update from @mithunveluri:
- Issue assigned to mithunveluri
- Issue marked as blocking: #443
- Issue priority set to: Normal
- Issue tagged with: D: Easy, D: Normal, F: Data Analysis, F: Utilities, S: Needs packaging, T: Software

5 months ago

Metadata Update from @mithunveluri:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 months ago

Log in to comment on this ticket.