summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Cacqueray <tdecacqu@redhat.com>2019-09-20 13:39:38 +0000
committerTristan Cacqueray <tdecacqu@redhat.com>2019-09-20 13:39:51 +0000
commit006fc839dd44e14bff068cd4bae90934f2946500 (patch)
treee584e27917ae31dc02c623bdfc7e75ce43d43ceb
parent4555285a02e87edeb1a8c64b0e0b5ade53244f6e (diff)
Initial packagingHEADmaster
Change-Id: I7ed9f9a2127799807f69bb472095acae0b2833b1
-rw-r--r--python-chardet.spec48
1 files changed, 48 insertions, 0 deletions
diff --git a/python-chardet.spec b/python-chardet.spec
new file mode 100644
index 0000000..3d2a4ca
--- /dev/null
+++ b/python-chardet.spec
@@ -0,0 +1,48 @@
+%global srcname chardet
+
+Name: python3-chardet
+Version: 3.0.4
+Release: 1%{?dist}
+Summary: The Universal Character Encoding Detector
+
+License: LGPL
+URL: https://chardet.readthedocs.io
+Source0: https://pypi.io/packages/source/%(c=%{srcname}; echo ${c:0:1})/%{srcname}/%{srcname}-%{version}.tar.gz
+
+BuildArch: noarch
+
+Requires: python3
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+
+%description
+The Universal Character Encoding Detector
+
+%prep
+%autosetup -n chardet-%{version} -p1
+
+%build
+rm -Rf requirements.txt test-requirements.txt *.egg-info
+PBR_VERSION=%{version} %{__python3} setup.py build
+
+%install
+PBR_VERSION=%{version} %{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+
+for bin in %{buildroot}%{_bindir}/*; do
+ mv ${bin} ${bin}-%{python3_version}
+ ln -s $(basename ${bin})-%{python3_version} ${bin}-3
+done
+
+%check
+%{__python3} -c "import chardet"
+
+%files
+%defattr(644,root,root,755)
+%{python3_sitelib}/*
+%defattr(755,root,root,755)
+%{_bindir}/chardetect*
+
+%changelog
+* Mon Jun 19 2017 Tristan Cacqueray <tdecacqu@redhat.com> - 3.0.4-1
+- Initial packaging