commit 00e3b913916c2dbbcb144a0a2682c19690d395ba
Author: Elan Ruusamäe <[email protected]>
Date:   Sun Apr 23 21:13:26 2017 +0300

    up to 0.12.4

 transifex-client-resource-creation.patch | 37 --------------------------------
 transifex-client.spec                    | 24 ++++++++++-----------
 2 files changed, 12 insertions(+), 49 deletions(-)
---
diff --git a/transifex-client.spec b/transifex-client.spec
index 99de2c9..8ebad14 100644
--- a/transifex-client.spec
+++ b/transifex-client.spec
@@ -1,21 +1,22 @@
+#
+# Conditional build:
+%bcond_with    tests   # do not perform "make test"
+
 %define                module          txclib
 %define                egg_name        transifex_client
 %define                pypi_name       transifex-client
 Summary:       Command line tool for Transifex translation management
 Name:          transifex-client
-Version:       0.10
-Release:       0.1
+Version:       0.12.4
+Release:       1
 License:       GPL v2
-Group:         Development/Languages
-Source0:       
http://pypi.python.org/packages/source/t/transifex-client/%{name}-%{version}.tar.gz
-# Source0-md5: 5549538d84b8eede6b254cd81ae024fa
-URL:           http://transifex.org
-Patch1:                %{name}-resource-creation.patch
+Group:         Development/Tools
+Source0:       
https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+# Source0-md5: a4eefdf7d29198bc8363e087d26712d1
+URL:           https://www.transifex.com/
 BuildRequires: python-setuptools
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
-Requires:      python-backports-ssl_match_hostname
-Requires:      python-setuptools
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -26,10 +27,9 @@ need of an elaborate UI system.
 
 %prep
 %setup -q
-%patch1 -p1
 
 %build
-%py_build
+%py_build %{?with_tests:test}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -40,7 +40,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc LICENSE README.rst
+%doc LICENSE README.md
 %attr(755,root,root) %{_bindir}/tx
 %{py_sitescriptdir}/%{module}
 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
diff --git a/transifex-client-resource-creation.patch 
b/transifex-client-resource-creation.patch
deleted file mode 100644
index 3fbbc47..0000000
--- a/transifex-client-resource-creation.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/txclib/project.py b/txclib/project.py
-index b5c5049..08828c6 100644
---- a/txclib/project.py
-+++ b/txclib/project.py
-@@ -23,6 +23,10 @@ class ProjectNotInit(Exception):
-     pass
- 
- 
-+class HttpNotFound(Exception):
-+    pass
-+
-+
- class Project(object):
-     """
-     Represents an association between the local and remote project instances.
-@@ -825,7 +829,10 @@ def do_url_request(self, api_call, multipart=False, 
data=None,
- 
-         r.close()
-         if r.status < 200 or r.status >= 400:
--            raise Exception(r.data)
-+            if r.status == 404:
-+                raise HttpNotFound(r.data)
-+            else:
-+                raise Exception(r.data)
-         return r.data
- 
-     def _should_update_translation(self, lang, stats, local_file, force=False,
-@@ -1080,6 +1087,9 @@ def _get_stats_for_resource(self):
-             r = self.do_url_request('resource_stats')
-             logger.debug("Statistics response is %s" % r)
-             stats = parse_json(r)
-+        except HttpNotFound:
-+            logger.debug("Resource not found, creating...")
-+            stats = {}
-         except ssl.SSLError:
-             logger.error("Invalid SSL certificate")
-             raise
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/transifex-client.git/commitdiff/00e3b913916c2dbbcb144a0a2682c19690d395ba

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to