summaryrefslogtreecommitdiff
path: root/python-escpos.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 09:32:20 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 09:32:20 +0000
commit6d289da1cc9538ddd3989b84795db9afb9dd3a7a (patch)
treec6b709837878548e90b2f0ddfb28a426e740b270 /python-escpos.spec
parenta63786ccf56b1ff6a3da969895dfb69fb411bc26 (diff)
automatic import of python-escpos
Diffstat (limited to 'python-escpos.spec')
-rw-r--r--python-escpos.spec102
1 files changed, 102 insertions, 0 deletions
diff --git a/python-escpos.spec b/python-escpos.spec
new file mode 100644
index 0000000..5e8b1b9
--- /dev/null
+++ b/python-escpos.spec
@@ -0,0 +1,102 @@
+%global _empty_manifest_terminate_build 0
+Name: python-escpos
+Version: 1.9
+Release: 1
+Summary: Python library to manipulate ESC/POS Printers
+License: LGPL
+URL: http://www.bitbucket.org/presik/psk-escpos/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/5f/5b/dee1aeb0ee0d8b60b5370cda0a679bf04111e59a72bc794fdefbb7ebdaa3/escpos-1.9.tar.gz
+BuildArch: noarch
+
+
+%description
+Python ESC/POS is a library which lets the user have access to all those printers handled
+by ESC/POS commands, as defined by Epson, from a Python application.
+The library tries to implement the functions provided by the ESC/POS-commandset and supports sending text, images,
+barcodes and qr-codes to the printer.
+Text can be aligned/justified and fonts can be changed by size, type and weight.
+Also, this module handles some hardware functionalities like cutting paper, control characters, printer reset
+and similar functions.
+Since supported commands differ from printer to printer the software tries to automatically apply the right
+settings for the printer that you set. These settings are handled by
+`escpos-printer-db <https://github.com/receipt-print-hq/escpos-printer-db>`_ which is also used in
+`escpos-php <https://github.com/mike42/escpos-php>`_.
+
+%package -n python3-escpos
+Summary: Python library to manipulate ESC/POS Printers
+Provides: python-escpos
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-escpos
+Python ESC/POS is a library which lets the user have access to all those printers handled
+by ESC/POS commands, as defined by Epson, from a Python application.
+The library tries to implement the functions provided by the ESC/POS-commandset and supports sending text, images,
+barcodes and qr-codes to the printer.
+Text can be aligned/justified and fonts can be changed by size, type and weight.
+Also, this module handles some hardware functionalities like cutting paper, control characters, printer reset
+and similar functions.
+Since supported commands differ from printer to printer the software tries to automatically apply the right
+settings for the printer that you set. These settings are handled by
+`escpos-printer-db <https://github.com/receipt-print-hq/escpos-printer-db>`_ which is also used in
+`escpos-php <https://github.com/mike42/escpos-php>`_.
+
+%package help
+Summary: Development documents and examples for escpos
+Provides: python3-escpos-doc
+%description help
+Python ESC/POS is a library which lets the user have access to all those printers handled
+by ESC/POS commands, as defined by Epson, from a Python application.
+The library tries to implement the functions provided by the ESC/POS-commandset and supports sending text, images,
+barcodes and qr-codes to the printer.
+Text can be aligned/justified and fonts can be changed by size, type and weight.
+Also, this module handles some hardware functionalities like cutting paper, control characters, printer reset
+and similar functions.
+Since supported commands differ from printer to printer the software tries to automatically apply the right
+settings for the printer that you set. These settings are handled by
+`escpos-printer-db <https://github.com/receipt-print-hq/escpos-printer-db>`_ which is also used in
+`escpos-php <https://github.com/mike42/escpos-php>`_.
+
+%prep
+%autosetup -n escpos-1.9
+
+%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-escpos -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.9-1
+- Package Spec generated