%global _empty_manifest_terminate_build 0 Name: python-bagit-profile Version: 1.3.1 Release: 1 Summary: This module can be used to validate BagitProfiles. License: CC0 URL: https://github.com/bagit-profiles/bagit-profiles-validator Source0: https://mirrors.nju.edu.cn/pypi/web/packages/fc/30/1768557c9f93e20ca2873df0f826c699cb31818099c6856d9b01d50e039b/bagit_profile-1.3.1.tar.gz BuildArch: noarch Requires: python3-bagit Requires: python3-requests %description Description ~~~~~~~~~~~ A simple Python module for validating BagIt profiles. See the `BagIt Profiles Specification `__ for more information. This module is intended for use with `bagit-python `__ but does not extend it. Installation ~~~~~~~~~~~~ ``bagit_profile.py`` is a single-file python module that you can drop into your project as needed or you can install globally with: 1. ``git clone https://github.com/bagit-profiles/bagit-profiles-validator.git`` 2. ``cd bagit-profiles-validator`` 3. ``sudo python setup.py install`` or: ``pip install bagit_profile`` Usage ~~~~~ import bagit import bagit_profile Instantiate an existing Bag using `bagit `__. ``python bag = bagit.Bag('mydir')`` Instantiate a profile, supplying its URI. ``python my_profile = bagit_profile.Profile('http://example.com/bagitprofile.json')`` Validate 'Serialization' and 'Accept-Serialization'. This must be done before .validate(bag) is called. 'mydir' is the path to the Bag. if my_profile.validate_serialization('mydir'): print "Serialization validates" else: print "Serialization does not validate" Validate the rest of the profile. if my_profile.validate(bag): print "Validates" else: print "Does not validate" Or from the commandline: ``bagit_profile.py 'http://uri.for.profile/profile.json' path/to/bag`` Test suite ~~~~~~~~~~ ``python setup.py test`` Development ~~~~~~~~~~~ 1. `Fork the repository `__ 2. Do something awesome! 3. `Submit a pull request `__ explianing what your code does License ~~~~~~~ CC0 %package -n python3-bagit-profile Summary: This module can be used to validate BagitProfiles. Provides: python-bagit-profile BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-bagit-profile Description ~~~~~~~~~~~ A simple Python module for validating BagIt profiles. See the `BagIt Profiles Specification `__ for more information. This module is intended for use with `bagit-python `__ but does not extend it. Installation ~~~~~~~~~~~~ ``bagit_profile.py`` is a single-file python module that you can drop into your project as needed or you can install globally with: 1. ``git clone https://github.com/bagit-profiles/bagit-profiles-validator.git`` 2. ``cd bagit-profiles-validator`` 3. ``sudo python setup.py install`` or: ``pip install bagit_profile`` Usage ~~~~~ import bagit import bagit_profile Instantiate an existing Bag using `bagit `__. ``python bag = bagit.Bag('mydir')`` Instantiate a profile, supplying its URI. ``python my_profile = bagit_profile.Profile('http://example.com/bagitprofile.json')`` Validate 'Serialization' and 'Accept-Serialization'. This must be done before .validate(bag) is called. 'mydir' is the path to the Bag. if my_profile.validate_serialization('mydir'): print "Serialization validates" else: print "Serialization does not validate" Validate the rest of the profile. if my_profile.validate(bag): print "Validates" else: print "Does not validate" Or from the commandline: ``bagit_profile.py 'http://uri.for.profile/profile.json' path/to/bag`` Test suite ~~~~~~~~~~ ``python setup.py test`` Development ~~~~~~~~~~~ 1. `Fork the repository `__ 2. Do something awesome! 3. `Submit a pull request `__ explianing what your code does License ~~~~~~~ CC0 %package help Summary: Development documents and examples for bagit-profile Provides: python3-bagit-profile-doc %description help Description ~~~~~~~~~~~ A simple Python module for validating BagIt profiles. See the `BagIt Profiles Specification `__ for more information. This module is intended for use with `bagit-python `__ but does not extend it. Installation ~~~~~~~~~~~~ ``bagit_profile.py`` is a single-file python module that you can drop into your project as needed or you can install globally with: 1. ``git clone https://github.com/bagit-profiles/bagit-profiles-validator.git`` 2. ``cd bagit-profiles-validator`` 3. ``sudo python setup.py install`` or: ``pip install bagit_profile`` Usage ~~~~~ import bagit import bagit_profile Instantiate an existing Bag using `bagit `__. ``python bag = bagit.Bag('mydir')`` Instantiate a profile, supplying its URI. ``python my_profile = bagit_profile.Profile('http://example.com/bagitprofile.json')`` Validate 'Serialization' and 'Accept-Serialization'. This must be done before .validate(bag) is called. 'mydir' is the path to the Bag. if my_profile.validate_serialization('mydir'): print "Serialization validates" else: print "Serialization does not validate" Validate the rest of the profile. if my_profile.validate(bag): print "Validates" else: print "Does not validate" Or from the commandline: ``bagit_profile.py 'http://uri.for.profile/profile.json' path/to/bag`` Test suite ~~~~~~~~~~ ``python setup.py test`` Development ~~~~~~~~~~~ 1. `Fork the repository `__ 2. Do something awesome! 3. `Submit a pull request `__ explianing what your code does License ~~~~~~~ CC0 %prep %autosetup -n bagit-profile-1.3.1 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-bagit-profile -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Apr 11 2023 Python_Bot - 1.3.1-1 - Package Spec generated