summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 23:27:00 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 23:27:00 +0000
commitab00198b96fdc076764295827e4da9f09b5e9a33 (patch)
tree69e7a2d6b8049770febba80c70f34bd539ba0412
parenta6fad5033d657d70116cb72d63ced177f519a7d6 (diff)
automatic import of python-imgtag
-rw-r--r--.gitignore1
-rw-r--r--python-imgtag.spec300
-rw-r--r--sources1
3 files changed, 302 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..d1d643d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/imgtag-1.1.6.tar.gz
diff --git a/python-imgtag.spec b/python-imgtag.spec
new file mode 100644
index 0000000..3f4b744
--- /dev/null
+++ b/python-imgtag.spec
@@ -0,0 +1,300 @@
+%global _empty_manifest_terminate_build 0
+Name: python-imgtag
+Version: 1.1.6
+Release: 1
+Summary: Simple XMP Image Tag & Metadata Editing Library
+License: GNU General Public License v3 (GPLv3)
+URL: https://github.com/nimaid/python-imgtag
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2d/24/0413a44b9698ecb2078c767591d74b9dae87f2b8ab0937b77a52978f48ec/imgtag-1.1.6.tar.gz
+BuildArch: noarch
+
+
+%description
+# ImgTag
+### Simple XMP Image Tag & Metadata Editing Module
+
+It is recomended to install using Conda to create a virtual python environment, as it makes it easy to install and manage different packages. Use the following commands to set up an environment:
+```
+conda env create -f environment.yml
+conda activate imgtag
+```
+
+<br/>
+
+If you choose to install manually, you must install `exempi` for your OS.
+
+For Debian:
+```
+sudo apt-get install -y exempi
+```
+For a Conda environment:
+```
+conda install -c conda-forge exempi
+```
+
+Once `exempi` is installed, install `imgtag` with:
+```
+python3 -m pip install -y imgtag
+```
+
+<br/>
+
+To use `imgtag`:
+```python
+from imgtag import ImgTag
+
+# Open image for tag editing
+test = ImgTag(
+ filename="test.jpg", # The image file
+ force_case="lower", # Converts the case of all tags
+ # Can be `None`, `"lower"`, `"upper"`
+ # Default: None
+ strip=True, # Strips whitespace from the ends of all tags
+ # Default: True
+ no_duplicates=True, # Removes all duplicate tags (case sensitive)
+ # Default: True
+ use_warnings=True # Toggles warnings
+ # Default: True
+ memory_limit_ratio=0.8 # The maximum percent of free memory to use
+ # Default: 0.8
+ )
+
+# Print existing tags
+print("Current tags:")
+for tag in test.get_tags():
+ print(" Tag:", tag)
+
+# Add tags
+test.add_tags(["sleepy", "happy"])
+
+# Remove tags
+test.remove_tags(["cute"])
+
+# Set tags, removing all existing tags
+test.set_tags(["dog", "good boy"])
+
+# Save changes and close file
+test.close()
+
+# Re-open for tag editing
+test.open()
+
+# Remove all tags
+test.clear_tags()
+
+# Delete the ImgTag object, automatically saving and closing the file
+del(test)
+```
+
+
+
+%package -n python3-imgtag
+Summary: Simple XMP Image Tag & Metadata Editing Library
+Provides: python-imgtag
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-imgtag
+# ImgTag
+### Simple XMP Image Tag & Metadata Editing Module
+
+It is recomended to install using Conda to create a virtual python environment, as it makes it easy to install and manage different packages. Use the following commands to set up an environment:
+```
+conda env create -f environment.yml
+conda activate imgtag
+```
+
+<br/>
+
+If you choose to install manually, you must install `exempi` for your OS.
+
+For Debian:
+```
+sudo apt-get install -y exempi
+```
+For a Conda environment:
+```
+conda install -c conda-forge exempi
+```
+
+Once `exempi` is installed, install `imgtag` with:
+```
+python3 -m pip install -y imgtag
+```
+
+<br/>
+
+To use `imgtag`:
+```python
+from imgtag import ImgTag
+
+# Open image for tag editing
+test = ImgTag(
+ filename="test.jpg", # The image file
+ force_case="lower", # Converts the case of all tags
+ # Can be `None`, `"lower"`, `"upper"`
+ # Default: None
+ strip=True, # Strips whitespace from the ends of all tags
+ # Default: True
+ no_duplicates=True, # Removes all duplicate tags (case sensitive)
+ # Default: True
+ use_warnings=True # Toggles warnings
+ # Default: True
+ memory_limit_ratio=0.8 # The maximum percent of free memory to use
+ # Default: 0.8
+ )
+
+# Print existing tags
+print("Current tags:")
+for tag in test.get_tags():
+ print(" Tag:", tag)
+
+# Add tags
+test.add_tags(["sleepy", "happy"])
+
+# Remove tags
+test.remove_tags(["cute"])
+
+# Set tags, removing all existing tags
+test.set_tags(["dog", "good boy"])
+
+# Save changes and close file
+test.close()
+
+# Re-open for tag editing
+test.open()
+
+# Remove all tags
+test.clear_tags()
+
+# Delete the ImgTag object, automatically saving and closing the file
+del(test)
+```
+
+
+
+%package help
+Summary: Development documents and examples for imgtag
+Provides: python3-imgtag-doc
+%description help
+# ImgTag
+### Simple XMP Image Tag & Metadata Editing Module
+
+It is recomended to install using Conda to create a virtual python environment, as it makes it easy to install and manage different packages. Use the following commands to set up an environment:
+```
+conda env create -f environment.yml
+conda activate imgtag
+```
+
+<br/>
+
+If you choose to install manually, you must install `exempi` for your OS.
+
+For Debian:
+```
+sudo apt-get install -y exempi
+```
+For a Conda environment:
+```
+conda install -c conda-forge exempi
+```
+
+Once `exempi` is installed, install `imgtag` with:
+```
+python3 -m pip install -y imgtag
+```
+
+<br/>
+
+To use `imgtag`:
+```python
+from imgtag import ImgTag
+
+# Open image for tag editing
+test = ImgTag(
+ filename="test.jpg", # The image file
+ force_case="lower", # Converts the case of all tags
+ # Can be `None`, `"lower"`, `"upper"`
+ # Default: None
+ strip=True, # Strips whitespace from the ends of all tags
+ # Default: True
+ no_duplicates=True, # Removes all duplicate tags (case sensitive)
+ # Default: True
+ use_warnings=True # Toggles warnings
+ # Default: True
+ memory_limit_ratio=0.8 # The maximum percent of free memory to use
+ # Default: 0.8
+ )
+
+# Print existing tags
+print("Current tags:")
+for tag in test.get_tags():
+ print(" Tag:", tag)
+
+# Add tags
+test.add_tags(["sleepy", "happy"])
+
+# Remove tags
+test.remove_tags(["cute"])
+
+# Set tags, removing all existing tags
+test.set_tags(["dog", "good boy"])
+
+# Save changes and close file
+test.close()
+
+# Re-open for tag editing
+test.open()
+
+# Remove all tags
+test.clear_tags()
+
+# Delete the ImgTag object, automatically saving and closing the file
+del(test)
+```
+
+
+
+%prep
+%autosetup -n imgtag-1.1.6
+
+%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-imgtag -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.6-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..75ec7d0
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+385f295e85dedffc9a1e8fbeb4f50db0 imgtag-1.1.6.tar.gz