From d91f4f4e28365fdb00116cb8f73db7bda5c0ed705ea988d521431ee14d78bcd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 26 Mar 2019 11:19:46 +0000 Subject: [PATCH] - Fix encoding tests fix-encoding.patch - Initial commit, needed by autobahn OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wsaccel?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++++ .gitignore | 1 + 0.6.2.tar.gz | 3 ++ LICENSE | 13 +++++++++ fix-encoding.patch | 11 ++++++++ python-wsaccel.changes | 9 ++++++ python-wsaccel.spec | 64 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 124 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0.6.2.tar.gz create mode 100644 LICENSE create mode 100644 fix-encoding.patch create mode 100644 python-wsaccel.changes create mode 100644 python-wsaccel.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0.6.2.tar.gz b/0.6.2.tar.gz new file mode 100644 index 0000000..4183c02 --- /dev/null +++ b/0.6.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:209d678c22f9c8414aa9de2353d4ca5cc94119553f660cec7d189e9ccc3accf1 +size 9632 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0b8a391 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright 2013-2015 INADA Naoki + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/fix-encoding.patch b/fix-encoding.patch new file mode 100644 index 0000000..b7eae01 --- /dev/null +++ b/fix-encoding.patch @@ -0,0 +1,11 @@ +Index: wsaccel-0.6.2/tests/test_4.py +=================================================================== +--- wsaccel-0.6.2.orig/tests/test_4.py ++++ wsaccel-0.6.2/tests/test_4.py +@@ -3,5 +3,5 @@ import wsaccel.utf8validator + + def test_validate(): + v = wsaccel.utf8validator.Utf8Validator() +- x = "Hello-µ@ßöäüàá-UTF-8!!" # taken from case 6.2.1 ++ x = "Hello-µ@ßöäüàá-UTF-8!!".encode('utf-8') # taken from case 6.2.1 + assert v.validate(x) == (True, True, 29, 29) diff --git a/python-wsaccel.changes b/python-wsaccel.changes new file mode 100644 index 0000000..d186095 --- /dev/null +++ b/python-wsaccel.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 26 11:14:27 UTC 2019 - Tomáš Chvátal + +- Fix encoding tests fix-encoding.patch + +------------------------------------------------------------------- +Tue Mar 26 10:56:55 UTC 2019 - Tomáš Chvátal + +- Initial commit, needed by autobahn diff --git a/python-wsaccel.spec b/python-wsaccel.spec new file mode 100644 index 0000000..38e0e46 --- /dev/null +++ b/python-wsaccel.spec @@ -0,0 +1,64 @@ +# +# spec file for package python-wsaccel +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-wsaccel +Version: 0.6.2 +Release: 0 +Summary: Accelerator for ws4py and AutobahnPython +License: Apache-2.0 +Group: Development/Languages/Python +Url: https://github.com/methane/wsaccel +Source: https://github.com/methane/wsaccel/archive/%{version}.tar.gz +Source1: https://raw.githubusercontent.com/methane/wsaccel/master/LICENSE +Patch0: fix-encoding.patch +BuildRequires: %{python_module Cython >= 0.16} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros + +%python_subpackages + +%description +WSAccell is WebSocket accelerator for `AutobahnPython `_, +`ws4py `_ and +`Tornado `_. + +%prep +%setup -q -n wsaccel-%{version} +%patch0 -p1 +cp %{SOURCE1} . + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +PYTHONPATH=%{buildroot}%{python3_sitearch} pytest-%{python3_bin_suffix} tests + +%files %{python_files} +%doc ChangeLog README.rst +%license LICENSE +%{python_sitearch}/* + +%changelog