summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-pytaglib.spec362
-rw-r--r--sources1
3 files changed, 364 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..10f2b18 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pytaglib-1.5.0.tar.gz
diff --git a/python-pytaglib.spec b/python-pytaglib.spec
new file mode 100644
index 0000000..fbc5e09
--- /dev/null
+++ b/python-pytaglib.spec
@@ -0,0 +1,362 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pytaglib
+Version: 1.5.0
+Release: 1
+Summary: cross-platform, Python audio metadata ("tagging") library based on TagLib
+License: GPLv3+
+URL: http://github.com/supermihi/pytaglib
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ea/bb/bdd8aa96668820731f8eb871a938efbf535cf70a3fbe2939d3323dfb0228/pytaglib-1.5.0.tar.gz
+
+
+%description
+# **pytaglib**
+[![PyPI](https://img.shields.io/pypi/v/pytaglib.svg)](https://pypi.org/project/pytaglib/)
+
+pytaglib is a [Python](http://www.python.org) audio tagging library. It is cross-platform and svery simple to use yet fully featured:
+ - [supports more than a dozen file formats](http://taglib.github.io) including mp3, flac, ogg, wma, and mp4,
+ - support arbitrary, non-standard tag names,
+ - support multiple values per tag.
+
+pytaglib is a very thin wrapper (≈150 lines of [code](src/taglib.pyx)) around the fast and rock-solid [TagLib](http://taglib.github.io) C++ library.
+## News
+See the [Changelog](CHANGELOG.md).
+## Get it
+At first, you might need to install taglib with development headers. Ubuntu, Mint and other Debian-Based distributions:
+
+ sudo apt install libtag1-dev
+
+On a Mac, use HomeBrew:
+
+ brew install taglib
+
+Then install pytaglib with [pip](https://pip.pypa.io/en/stable/):
+
+ pip install pytaglib
+
+
+
+For other operating systems and more details, see [installation notes](#installation-notes) below.
+
+## Usage
+
+```python
+>>> import taglib
+>>> song = taglib.File("/path/to/my/file.mp3")
+>>> song.tags
+{'ARTIST': ['piman', 'jzig'], 'ALBUM': ['Quod Libet Test Data'], 'TITLE': ['Silence'], 'GENRE': ['Silence'], 'TRACKNUMBER': ['02/10'], 'DATE': ['2004']}
+
+>>> song.length
+239
+>>> song.tags["ALBUM"] = ["White Album"] # always use lists, even for single values
+>>> del song.tags["DATE"]
+>>> song.tags["GENRE"] = ["Vocal", "Classical"]
+>>> song.tags["PERFORMER:HARPSICHORD"] = ["Ton Koopman"]
+>>> song.save()
+```
+For detailed API documentation, use the docstrings of the `taglib.File` class or view the [source code](src/taglib.pyx) directly.
+
+
+## `pyprinttags`
+This package also installs the `pyprinttags` script. It takes one or more files as
+command-line parameters and will display all known metadata of that files on the terminal.
+If unsupported tags (a.k.a. non-textual information) are found, they can optionally be removed
+from the file.
+
+## Installation Notes
+
+* Ensure that `pip` is installed and points to the correct Python version
+ - on Windows, be sure to check *install pip* in the Python installer
+ - on Debian/Ubuntu/Mint, install `python3-pip`
+ - you might need to type, e.g., `pip-3` to install pytaglib for Python 3 if your system's default is Python 2.x.
+* For Windows users, there are some precompiled binary packages (wheels). See the [PyPI page](https://pypi.python.org/pypi/pytaglib) for a list of supported Python versions.
+* If no binary packages exists, you need to have both Python and taglib installed with development headers (packages `python3-dev` (or `python-dev`) and `libtag1-dev` for debian / ubuntu and derivates, `python-devel` and `taglib-devel` for fedora and friends, `brew install taglib` on OS X).
+
+
+### Linux: Distribution-Specific Packages
+* Debian- and Ubuntu-based linux flavors have binary packages for the Python 3 version, called `python3-taglib`. Unfortunatelly, they are heavily outdated, so you should instally the recent version via `pip` whenever possible.
+* For Arch users, there is a [package](https://aur.archlinux.org/packages/python-pytaglib/) in the user repository (AUR).
+
+### Manual Compilation: General
+You can download or checkout the sources and compile manually:
+
+ python setup.py build
+ python setup.py test # optional, run unit tests
+ sudo python setup.py install
+
+
+**Note**: The `taglib` Python extension is built from [`taglib.cpp`](src/taglib.cpp) which in turn is
+auto-generated by [Cython](http://www.cython.org) from [`taglib.pyx`](src/taglib.pyx).
+To regenerate the `taglib.cpp` after making changes to `taglib.pyx`, set the environment variable `PYTAGLIB_CYTHONIZE` to `1` before calling `setup.py` or `pip`.
+
+### Compilation: Windows
+
+Install MS Visual Studio Build Tools (or the complete IE) and include the correct compiler version as detailed [here](https://wiki.python.org/moin/WindowsCompilers). Also enable *cmake* in the Visual Studio Installer.
+
+Then:
+- open the VS native tools command prompt
+- navigate to the *pytaglib* repository
+- run `python build_taglib_windows.py` which will download and build the latest official TagLib release
+- run `python setup.py install`
+
+
+## Contact
+For bug reports or feature requests, please use the
+[issue tracker](https://github.com/supermihi/pytaglib/issues) on GitHub. For anything else, contact
+me by [email](mailto:michaelhelmling@posteo.de).
+
+
+
+
+%package -n python3-pytaglib
+Summary: cross-platform, Python audio metadata ("tagging") library based on TagLib
+Provides: python-pytaglib
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+BuildRequires: python3-cffi
+BuildRequires: gcc
+BuildRequires: gdb
+%description -n python3-pytaglib
+# **pytaglib**
+[![PyPI](https://img.shields.io/pypi/v/pytaglib.svg)](https://pypi.org/project/pytaglib/)
+
+pytaglib is a [Python](http://www.python.org) audio tagging library. It is cross-platform and svery simple to use yet fully featured:
+ - [supports more than a dozen file formats](http://taglib.github.io) including mp3, flac, ogg, wma, and mp4,
+ - support arbitrary, non-standard tag names,
+ - support multiple values per tag.
+
+pytaglib is a very thin wrapper (≈150 lines of [code](src/taglib.pyx)) around the fast and rock-solid [TagLib](http://taglib.github.io) C++ library.
+## News
+See the [Changelog](CHANGELOG.md).
+## Get it
+At first, you might need to install taglib with development headers. Ubuntu, Mint and other Debian-Based distributions:
+
+ sudo apt install libtag1-dev
+
+On a Mac, use HomeBrew:
+
+ brew install taglib
+
+Then install pytaglib with [pip](https://pip.pypa.io/en/stable/):
+
+ pip install pytaglib
+
+
+
+For other operating systems and more details, see [installation notes](#installation-notes) below.
+
+## Usage
+
+```python
+>>> import taglib
+>>> song = taglib.File("/path/to/my/file.mp3")
+>>> song.tags
+{'ARTIST': ['piman', 'jzig'], 'ALBUM': ['Quod Libet Test Data'], 'TITLE': ['Silence'], 'GENRE': ['Silence'], 'TRACKNUMBER': ['02/10'], 'DATE': ['2004']}
+
+>>> song.length
+239
+>>> song.tags["ALBUM"] = ["White Album"] # always use lists, even for single values
+>>> del song.tags["DATE"]
+>>> song.tags["GENRE"] = ["Vocal", "Classical"]
+>>> song.tags["PERFORMER:HARPSICHORD"] = ["Ton Koopman"]
+>>> song.save()
+```
+For detailed API documentation, use the docstrings of the `taglib.File` class or view the [source code](src/taglib.pyx) directly.
+
+
+## `pyprinttags`
+This package also installs the `pyprinttags` script. It takes one or more files as
+command-line parameters and will display all known metadata of that files on the terminal.
+If unsupported tags (a.k.a. non-textual information) are found, they can optionally be removed
+from the file.
+
+## Installation Notes
+
+* Ensure that `pip` is installed and points to the correct Python version
+ - on Windows, be sure to check *install pip* in the Python installer
+ - on Debian/Ubuntu/Mint, install `python3-pip`
+ - you might need to type, e.g., `pip-3` to install pytaglib for Python 3 if your system's default is Python 2.x.
+* For Windows users, there are some precompiled binary packages (wheels). See the [PyPI page](https://pypi.python.org/pypi/pytaglib) for a list of supported Python versions.
+* If no binary packages exists, you need to have both Python and taglib installed with development headers (packages `python3-dev` (or `python-dev`) and `libtag1-dev` for debian / ubuntu and derivates, `python-devel` and `taglib-devel` for fedora and friends, `brew install taglib` on OS X).
+
+
+### Linux: Distribution-Specific Packages
+* Debian- and Ubuntu-based linux flavors have binary packages for the Python 3 version, called `python3-taglib`. Unfortunatelly, they are heavily outdated, so you should instally the recent version via `pip` whenever possible.
+* For Arch users, there is a [package](https://aur.archlinux.org/packages/python-pytaglib/) in the user repository (AUR).
+
+### Manual Compilation: General
+You can download or checkout the sources and compile manually:
+
+ python setup.py build
+ python setup.py test # optional, run unit tests
+ sudo python setup.py install
+
+
+**Note**: The `taglib` Python extension is built from [`taglib.cpp`](src/taglib.cpp) which in turn is
+auto-generated by [Cython](http://www.cython.org) from [`taglib.pyx`](src/taglib.pyx).
+To regenerate the `taglib.cpp` after making changes to `taglib.pyx`, set the environment variable `PYTAGLIB_CYTHONIZE` to `1` before calling `setup.py` or `pip`.
+
+### Compilation: Windows
+
+Install MS Visual Studio Build Tools (or the complete IE) and include the correct compiler version as detailed [here](https://wiki.python.org/moin/WindowsCompilers). Also enable *cmake* in the Visual Studio Installer.
+
+Then:
+- open the VS native tools command prompt
+- navigate to the *pytaglib* repository
+- run `python build_taglib_windows.py` which will download and build the latest official TagLib release
+- run `python setup.py install`
+
+
+## Contact
+For bug reports or feature requests, please use the
+[issue tracker](https://github.com/supermihi/pytaglib/issues) on GitHub. For anything else, contact
+me by [email](mailto:michaelhelmling@posteo.de).
+
+
+
+
+%package help
+Summary: Development documents and examples for pytaglib
+Provides: python3-pytaglib-doc
+%description help
+# **pytaglib**
+[![PyPI](https://img.shields.io/pypi/v/pytaglib.svg)](https://pypi.org/project/pytaglib/)
+
+pytaglib is a [Python](http://www.python.org) audio tagging library. It is cross-platform and svery simple to use yet fully featured:
+ - [supports more than a dozen file formats](http://taglib.github.io) including mp3, flac, ogg, wma, and mp4,
+ - support arbitrary, non-standard tag names,
+ - support multiple values per tag.
+
+pytaglib is a very thin wrapper (≈150 lines of [code](src/taglib.pyx)) around the fast and rock-solid [TagLib](http://taglib.github.io) C++ library.
+## News
+See the [Changelog](CHANGELOG.md).
+## Get it
+At first, you might need to install taglib with development headers. Ubuntu, Mint and other Debian-Based distributions:
+
+ sudo apt install libtag1-dev
+
+On a Mac, use HomeBrew:
+
+ brew install taglib
+
+Then install pytaglib with [pip](https://pip.pypa.io/en/stable/):
+
+ pip install pytaglib
+
+
+
+For other operating systems and more details, see [installation notes](#installation-notes) below.
+
+## Usage
+
+```python
+>>> import taglib
+>>> song = taglib.File("/path/to/my/file.mp3")
+>>> song.tags
+{'ARTIST': ['piman', 'jzig'], 'ALBUM': ['Quod Libet Test Data'], 'TITLE': ['Silence'], 'GENRE': ['Silence'], 'TRACKNUMBER': ['02/10'], 'DATE': ['2004']}
+
+>>> song.length
+239
+>>> song.tags["ALBUM"] = ["White Album"] # always use lists, even for single values
+>>> del song.tags["DATE"]
+>>> song.tags["GENRE"] = ["Vocal", "Classical"]
+>>> song.tags["PERFORMER:HARPSICHORD"] = ["Ton Koopman"]
+>>> song.save()
+```
+For detailed API documentation, use the docstrings of the `taglib.File` class or view the [source code](src/taglib.pyx) directly.
+
+
+## `pyprinttags`
+This package also installs the `pyprinttags` script. It takes one or more files as
+command-line parameters and will display all known metadata of that files on the terminal.
+If unsupported tags (a.k.a. non-textual information) are found, they can optionally be removed
+from the file.
+
+## Installation Notes
+
+* Ensure that `pip` is installed and points to the correct Python version
+ - on Windows, be sure to check *install pip* in the Python installer
+ - on Debian/Ubuntu/Mint, install `python3-pip`
+ - you might need to type, e.g., `pip-3` to install pytaglib for Python 3 if your system's default is Python 2.x.
+* For Windows users, there are some precompiled binary packages (wheels). See the [PyPI page](https://pypi.python.org/pypi/pytaglib) for a list of supported Python versions.
+* If no binary packages exists, you need to have both Python and taglib installed with development headers (packages `python3-dev` (or `python-dev`) and `libtag1-dev` for debian / ubuntu and derivates, `python-devel` and `taglib-devel` for fedora and friends, `brew install taglib` on OS X).
+
+
+### Linux: Distribution-Specific Packages
+* Debian- and Ubuntu-based linux flavors have binary packages for the Python 3 version, called `python3-taglib`. Unfortunatelly, they are heavily outdated, so you should instally the recent version via `pip` whenever possible.
+* For Arch users, there is a [package](https://aur.archlinux.org/packages/python-pytaglib/) in the user repository (AUR).
+
+### Manual Compilation: General
+You can download or checkout the sources and compile manually:
+
+ python setup.py build
+ python setup.py test # optional, run unit tests
+ sudo python setup.py install
+
+
+**Note**: The `taglib` Python extension is built from [`taglib.cpp`](src/taglib.cpp) which in turn is
+auto-generated by [Cython](http://www.cython.org) from [`taglib.pyx`](src/taglib.pyx).
+To regenerate the `taglib.cpp` after making changes to `taglib.pyx`, set the environment variable `PYTAGLIB_CYTHONIZE` to `1` before calling `setup.py` or `pip`.
+
+### Compilation: Windows
+
+Install MS Visual Studio Build Tools (or the complete IE) and include the correct compiler version as detailed [here](https://wiki.python.org/moin/WindowsCompilers). Also enable *cmake* in the Visual Studio Installer.
+
+Then:
+- open the VS native tools command prompt
+- navigate to the *pytaglib* repository
+- run `python build_taglib_windows.py` which will download and build the latest official TagLib release
+- run `python setup.py install`
+
+
+## Contact
+For bug reports or feature requests, please use the
+[issue tracker](https://github.com/supermihi/pytaglib/issues) on GitHub. For anything else, contact
+me by [email](mailto:michaelhelmling@posteo.de).
+
+
+
+
+%prep
+%autosetup -n pytaglib-1.5.0
+
+%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-pytaglib -f filelist.lst
+%dir %{python3_sitearch}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 1.5.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..243a271
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1176897de0d2943a3c6814634657fa66 pytaglib-1.5.0.tar.gz