## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # require network, and nose, so disabled by default # to run on mock, use --enable-network # only a couple of tests fail %bcond_with tests %global forgeurl https://github.com/datalad/datalad Name: python-datalad Version: 0.14.7 %global tag %{version} %forgemeta Release: %autorelease Summary: Keep code, data, containers under control with git and git-annex License: MIT URL: %{forgeurl} Source0: %{forgesource} BuildArch: noarch %global _description %{expand: DataLad makes data management and data distribution more accessible. To do that, it stands on the shoulders of Git and Git-annex to deliver a decentralized system for data exchange. This includes automated ingestion of data from online portals and exposing it in readily usable form as Git(-annex) repositories, so-called datasets. The actual data storage and permission management, however, remains with the original data providers. The full documentation is available at https://docs.datalad.org and https://handbook.datalad.org provides a hands-on crash-course on DataLad Extensions: A number of extensions are available that provide additional functionality for DataLad. Extensions are separate packages that are to be installed in addition to DataLad. In order to install DataLad customized for a particular domain, one can simply install an extension directly, and DataLad itself will be automatically installed with it. An annotated list of extensions is available in the DataLad handbook. Support: The documentation for this project is found here: https://docs.datalad.org If you have a problem or would like to ask a question about how to use DataLad, please submit a question to NeuroStars.org with a datalad tag. NeuroStars.org is a platform similar to StackOverflow but dedicated to neuroinformatics. All previous DataLad questions are available here: https://neurostars.org/tags/datalad/} %description %_description %package -n python3-datalad Summary: %{summary} BuildRequires: python3-devel %if %{with tests} BuildRequires: git-annex # for 7za BuildRequires: p7zip %endif # Not added automatically Requires: git-annex Provides: datalad = %{version}-%{release} %description -n python3-datalad %_description %package doc Summary: Documentation for %{name} BuildRequires: make BuildRequires: git BuildRequires: %{py3_dist sphinx} %description doc This package provides documentation for %{name}. %prep %forgesetup # Do not read deps from tox.ini, just use setup.py # tox.ini calls requirements.txt which doesn't work rm -f tox.ini # Correct shebangs in tools find . -type f -exec sed -i "s|#!/usr/bin/env.*python$|#!%{python3}|" '{}' ';' # remove shebangs find datalad/resources/procedures/ -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' # Do not use the rtd theme sed -i 's/sphinx_rtd_theme/classic/' docs/source/conf.py echo "warning-is-error = 0" >> setup.cfg # Docs want git set up for some reason git config --global user.name "Your Name" git config --global user.email "youremail@yourdomain.com" %if %{with tests} # Tests wants a git repo git init . git add . git commit -m "Dummy commit" # correct function argument auto_spec -> autospec sed -i 's/auto_spec/autospec/' datalad/support/tests/test_annexrepo.py %endif %generate_buildrequires # runtime requires needed for docs %pyproject_buildrequires -r %{?with_tests:-x tests} %build %pyproject_wheel pushd docs # Missing directory causes docs build to fail mkdir source/_extras # Sometimes PYTHONPATH is needed so sphinx can import the module # set SPHINXOPTS to nothing, otherwise it sets -W which makes it fail PYTHONPATH="$PYTHONPATH:.." make SPHINXBUILD="DATALAD_SPHINX_RUN=1 sphinx-build-3" SPHINXOPTS="" html rm -rf build/html/{.doctrees,.buildinfo} -vf popd %install %pyproject_install %pyproject_save_files datalad %check %if %{with tests} # Uses nose, unfortunately and it seems to be too hard to switch to pytest so # it's just nose for the moment # https://github.com/datalad/datalad/issues/4090 # https://github.com/datalad/datalad/pull/4232 export PATH="${PATH}:%{buildroot}/%{_bindir}" export PYTHONPATH="$PYTHONPATH:%{buildroot}/%{python3_sitelib}:%{python3_sitearch}" nosetests-%{python3_version} %endif %files -n python3-datalad -f %{pyproject_files} %doc README.md CONTRIBUTORS CONTRIBUTING.md CHANGELOG.md CODE_OF_CONDUCT.md %{_bindir}/datalad %{_bindir}/git-annex-remote-datalad %{_bindir}/git-annex-remote-datalad-archives %{_bindir}/git-annex-remote-ora %files doc %license COPYING %doc docs/build/html %changelog * Fri Sep 10 2021 Ankur Sinha (Ankur Sinha Gmail) 0.14.7-1 - feat: init