Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
spacewalk-usix
spacewalk-usix-git-0.0ad9ff1.obscpio
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File spacewalk-usix-git-0.0ad9ff1.obscpio of Package spacewalk-usix
07070100000000000041FD0000000000000000000000015CDC163600000000000000000000000000000000000000000000000F00000000spacewalk-usix07070100000001000081B40000000000000000000000015CDC163600000583000000000000000000000000000000000000001F00000000spacewalk-usix/Makefile.pythonTHIS_MAKEFILE := $(realpath $(lastword $(MAKEFILE_LIST))) CURRENT_DIR := $(dir $(THIS_MAKEFILE)) include $(CURRENT_DIR)../rel-eng/Makefile.python # Docker tests variables DOCKER_CONTAINER_BASE = uyuni-master DOCKER_REGISTRY = registry.mgr.suse.de DOCKER_RUN_EXPORT = "PYTHONPATH=$PYTHONPATH" DOCKER_VOLUMES = -v "$(CURDIR)/../:/manager" __pylint :: $(call update_pip_env) pylint --rcfile=pylintrc common/ > reports/pylint.log || true __pytest :: $(call update_pip_env) $(call install_pytest) $(call install_by_setup, './') cd tests pytest --disable-warnings --tb=native --color=yes -svv __pylint_out :: $(call update_pip_env) pylint --rcfile=pylintrc common docker_pylint :: docker run --rm -e $(DOCKER_RUN_EXPORT) $(DOCKER_VOLUMES) $(DOCKER_REGISTRY)/$(DOCKER_CONTAINER_BASE)-pgsql /bin/sh -c "cd /manager/usix; make -f Makefile.python __pylint" docker_pytest :: docker run --rm -e $(DOCKER_RUN_EXPORT) $(DOCKER_VOLUMES) $(DOCKER_REGISTRY)/$(DOCKER_CONTAINER_BASE)-pgsql /bin/sh -c "cd /manager/usix; make -f Makefile.python __pytest" docker_pylint_cli :: docker run --rm -e $(DOCKER_RUN_EXPORT) $(DOCKER_VOLUMES) $(DOCKER_REGISTRY)/$(DOCKER_CONTAINER_BASE)-pgsql /bin/sh -c "cd /manager/usix; make -f Makefile.python __pylint_out" docker_shell :: docker run -t -i --rm -e $(DOCKER_RUN_EXPORT) $(DOCKER_VOLUMES) $(DOCKER_REGISTRY)/$(DOCKER_CONTAINER_BASE)-pgsql /bin/bash 07070100000002000081B40000000000000000000000015CDC163600000265000000000000000000000000000000000000001B00000000spacewalk-usix/__init__.py# # Copyright (c) 2009--2017 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 # along with this software; if not, see # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. # # Red Hat trademarks are not licensed under GPLv2. No permission is # granted to use or replicate Red Hat trademarks that are incorporated # in this software or its documentation. # 07070100000003000041FD0000000000000000000000015CDC163600000000000000000000000000000000000000000000001600000000spacewalk-usix/common07070100000004000081B40000000000000000000000015CDC16360000039C000000000000000000000000000000000000002200000000spacewalk-usix/common/__init__.py# # Copyright (c) 2008--2017 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 # along with this software; if not, see # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. # # Red Hat trademarks are not licensed under GPLv2. No permission is # granted to use or replicate Red Hat trademarks that are incorporated # in this software or its documentation. # # Initialization file for the common module # """ Usix package. """ # try to figure out if we're running under Apache or not try: from spacewalk.common.rhnApache import rhnApache import _apache except ImportError: # no _apache available, not running under apache/mod_python pass __all__ = [] 07070100000005000081B40000000000000000000000015CDC163600000966000000000000000000000000000000000000001E00000000spacewalk-usix/common/usix.py# # Copyright (c) 2013--2017 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 # along with this software; if not, see # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. # # Red Hat trademarks are not licensed under GPLv2. No permission is # granted to use or replicate Red Hat trademarks that are incorporated # in this software or its documentation. # """ Usix is a library to bring compatibility between Python2 and Python3. """ # pylint: disable=E1101 import sys import types PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 # Common data types # Common data types if PY3: BufferType = bytes UnicodeType = bytes StringType = str DictType = dict IntType = int LongType = int ListType = list ClassType = type FloatType = float TupleType = tuple TypeType = type InstanceType = object else: BufferType = types.BufferType UnicodeType = unicode # pylint: disable=E0602 StringType = types.StringType DictType = types.DictType IntType = types.IntType LongType = types.LongType ListType = types.ListType ClassType = types.BufferType FloatType = types.FloatType TupleType = types.TupleType TypeType = types.TypeType InstanceType = types.InstanceType # Common limits if PY3: MaxInt = sys.maxsize else: MaxInt = sys.maxint # Common methods # raise exception with traceback # pylint: disable=W0122 if PY3: def raise_with_tb(value, tb=None): """ Re-raise an exception with the traceback. """ try: if value.__traceback__ is not tb: raise value.with_traceback(tb) raise value finally: value = None tb = None else: exec(""" def raise_with_tb(value, tb=None): try: raise value, None, tb finally: tb = None """) # code from original 'six' module # added for compatibility with Python 2.4 try: advance_iterator = next except NameError: def advance_iterator(it): """ Iterator invocation. """ return it.next() next = advance_iterator # pylint: disable=W0622 07070100000006000081B40000000000000000000000015CDC163600000D38000000000000000000000000000000000000001800000000spacewalk-usix/pylintrc# spacewalk pylint configuration [MASTER] # Profiled execution. profile=no # Pickle collected data for later comparisons. persistent=no suggestion-mode=no [MESSAGES CONTROL] # No disabled messages in usix # disable= [REPORTS] # Set the output format. Available formats are text, parseable, colorized, msvs # (visual studio) and html output-format=parseable # Include message's id in output include-ids=yes # Tells whether to display a full report or only the messages reports=yes # Template used to display messages. This is a python new-style format string # used to format the message information. See doc for all details msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" [VARIABLES] # A regular expression matching names used for dummy variables (i.e. not used). dummy-variables-rgx=_|dummy [BASIC] # Regular expression which should only match correct module names #module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ module-rgx=([a-zA-Z_][a-zA-Z0-9_]+)$ # Regular expression which should only match correct module level names const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$ # Regular expression which should only match correct class names class-rgx=[a-zA-Z_][a-zA-Z0-9_]+$ # Regular expression which should only match correct function names function-rgx=[a-z_][a-zA-Z0-9_]{,42}$ # Regular expression which should only match correct method names method-rgx=[a-z_][a-zA-Z0-9_]{,42}$ # Regular expression which should only match correct instance attribute names attr-rgx=[a-z_][a-zA-Z0-9_]{,30}$ # Regular expression which should only match correct argument names argument-rgx=[a-z_][a-zA-Z0-9_]{,30}$ # Regular expression which should only match correct variable names variable-rgx=[a-z_][a-zA-Z0-9_]{,30}$ # Regular expression which should only match correct list comprehension / # generator expression variable names inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ # Regular expression which should only match correct class sttribute names class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,42}|(__.*__))$ # Good variable names which should always be accepted, separated by a comma good-names=i,j,k,ex,Run,_ # Bad variable names which should always be refused, separated by a comma bad-names=foo,bar,baz,toto,tutu,tata # List of builtins function names that should not be used, separated by a comma bad-functions=apply,input [DESIGN] # Maximum number of arguments for function / method max-args=10 # Maximum number of locals for function / method body max-locals=20 # Maximum number of return / yield for function / method body max-returns=6 # Maximum number of branch for function / method body max-branchs=20 # Maximum number of statements in function / method body max-statements=50 # Maximum number of parents for a class (see R0901). max-parents=7 # Maximum number of attributes for a class (see R0902). max-attributes=7 # Minimum number of public methods for a class (see R0903). min-public-methods=1 # Maximum number of public methods for a class (see R0904). max-public-methods=20 [CLASSES] [FORMAT] # Maximum number of characters on a single line. max-line-length=120 # Maximum number of lines in a module max-module-lines=1000 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 # tab). indent-string=' ' [MISCELLANEOUS] # List of note tags to take in consideration, separated by a comma. notes= 07070100000007000081B40000000000000000000000015CDC1636000002F9000000000000000000000000000000000000001800000000spacewalk-usix/setup.py# coding: utf-8 """ Setup file. """ import os from setuptools import setup, find_packages def get_version_changelog(): """ Get a version from the current changelog. """ changelog = None version = "4.0.9't matter. for fname in os.listdir(os.path.dirname(os.path.abspath(__file__))): if fname.endswith(".changes"): changelog = fname break if changelog: with open(changelog, "r") as hcl: for line in hcl.readlines(): if "version" in line: version = line.split(" ")[-1] # Typically version is the last one break return version setup( name='usix', version=get_version_changelog(), packages=find_packages() ) 07070100000008000081B40000000000000000000000015CDC163600000B32000000000000000000000000000000000000002600000000spacewalk-usix/spacewalk-usix.changes------------------------------------------------------------------- Wed May 15 15:19:56 CEST 2019 - jgonzalez@suse.com - version 4.0.9-1 - SPEC cleanup ------------------------------------------------------------------- Mon Apr 22 12:16:33 CEST 2019 - jgonzalez@suse.com - version 4.0.8-1 - add unit tests ------------------------------------------------------------------- Fri Mar 29 10:32:42 CET 2019 - jgonzalez@suse.com - version 4.0.7-1 - Fix pylint issues. ------------------------------------------------------------------- Mon Mar 25 16:45:32 CET 2019 - jgonzalez@suse.com - version 4.0.6-1 - Add PyLint runner and configuration. ------------------------------------------------------------------- Sat Mar 02 00:12:10 CET 2019 - jgonzalez@suse.com - version 4.0.5-1 - Fix UnicodeType as bytes on Python 3 ------------------------------------------------------------------- Wed Feb 27 13:04:18 CET 2019 - jgonzalez@suse.com - version 4.0.4-1 - Fix BufferType as bytes on Python 3 ------------------------------------------------------------------- Fri Feb 08 17:39:36 CET 2019 - jgonzalez@suse.com - version 4.0.3-1 - Fix StringType as str on Python 3 ------------------------------------------------------------------- Fri Oct 26 10:45:34 CEST 2018 - jgonzalez@suse.com - version 4.0.2-1 - use rpm for debian packaging ------------------------------------------------------------------- Fri Aug 10 15:34:22 CEST 2018 - jgonzalez@suse.com - version 4.0.1-1 - Bump version to 4.0.0 (bsc#1104034) - Fix copyright for the package specfile (bsc#1103696) ------------------------------------------------------------------- Mon Mar 05 09:22:11 CET 2018 - jgonzalez@suse.com - version 2.8.3.1-1 - split spacewalk-usix into python2 and python3 variants - remove empty clean section from spec (bsc#1083294) ------------------------------------------------------------------- Fri Feb 23 11:40:07 CET 2018 - jgonzalez@suse.com - version 2.8.1.1-1 - Sync with upstream ------------------------------------------------------------------- Wed Jan 17 12:59:29 CET 2018 - jgonzalez@suse.com - version 2.8.0.2-1 - use macro build_py3 ------------------------------------------------------------------- Thu Oct 26 17:10:52 CEST 2017 - mc@suse.de - version 2.8.0.1-1 - build subpackage with python3 ------------------------------------------------------------------- Wed May 03 16:15:52 CEST 2017 - michele.bologna@suse.com - version 2.7.5.2-1 - fix build for RHEL 6 ------------------------------------------------------------------- Mon Mar 06 16:35:53 CET 2017 - mc@suse.de - version 2.7.5.1-1 - Updated links to github in spec files - SLES11 does not support noarch python packages - add defattr for older distros ------------------------------------------------------------------- Sat Feb 18 12:27:00 CET 2017 - mc@suse.de - initial package 07070100000009000081B40000000000000000000000015CDC163600001697000000000000000000000000000000000000002300000000spacewalk-usix/spacewalk-usix.spec# # spec file for package spacewalk-usix # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2008-2018 Red Hat, Inc. # # 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/ # %if 0%{?fedora} || 0%{?suse_version} > 1320 || 0%{?rhel} >= 8 %global build_py3 1 %endif # ------------------------------- Python macros (mostly for debian) ------------------------------- %{!?__python2:%global __python2 /usr/bin/python2} %{!?__python3:%global __python3 /usr/bin/python3} %if %{undefined python2_version} %global python2_version %(%{__python2} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") %endif %if %{undefined python3_version} %global python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])") %endif %if %{undefined python2_sitelib} %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %endif %if %{undefined python3_sitelib} %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %endif # --------------------------- End Python macros --------------------------------------------------- %if %{_vendor} == "debbuild" # Bash constructs in scriptlets don't play nice with Debian's default shell, dash %global _buildshell /bin/bash %endif %if 0%{?build_py3} %global python3rhnroot %{python3_sitelib}/spacewalk %endif %global pythonrhnroot %{python2_sitelib}/spacewalk Name: spacewalk-usix Version: 4.0.9 Release: 1%{?dist} Summary: Spacewalk server and client nano six library %if %{_vendor} == "debbuild" Group: admin Packager: Uyuni Project <uyuni-devel@opensuse.org> %else Group: Applications/Internet %endif License: GPL-2.0-only Url: https://github.com/uyuni-project/uyuni Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} >= 1210 || 0%{?debian} || 0%{?ubuntu} BuildArch: noarch %endif Provides: python2-spacewalk-usix = %{version}-%{release} Provides: spacewalk-backend-usix = %{version}-%{release} Obsoletes: spacewalk-backend-usix < 2.8 %if %{_vendor} == "debbuild" BuildRequires: python-dev Requires(preun): python-minimal Requires(post): python-minimal %else BuildRequires: python-devel %endif %description Library for writing code that runs on Python 2 and 3 %if 0%{?build_py3} %package -n python3-%{name} Summary: Spacewalk client micro six library Group: Applications/Internet Provides: python3-spacewalk-backend-usix = %{version}-%{release} Obsoletes: python3-spacewalk-backend-usix < 2.8 %if %{_vendor} == "debbuild" BuildRequires: python3-dev Requires(preun): python3-minimal Requires(post): python3-minimal %else BuildRequires: python3-devel %endif %description -n python3-%{name} Library for writing code that runs on Python 2 and 3 %endif %prep %setup -q %build %define debug_package %{nil} %install install -m 0755 -d $RPM_BUILD_ROOT%{pythonrhnroot}/common install -m 0644 __init__.py $RPM_BUILD_ROOT%{pythonrhnroot}/__init__.py install -m 0644 common/__init__.py $RPM_BUILD_ROOT%{pythonrhnroot}/common/__init__.py install -m 0644 common/usix.py* $RPM_BUILD_ROOT%{pythonrhnroot}/common/usix.py %if 0%{?build_py3} install -d $RPM_BUILD_ROOT%{python3rhnroot}/common cp $RPM_BUILD_ROOT%{pythonrhnroot}/__init__.py $RPM_BUILD_ROOT%{python3rhnroot} cp $RPM_BUILD_ROOT%{pythonrhnroot}/common/__init__.py $RPM_BUILD_ROOT%{python3rhnroot}/common cp $RPM_BUILD_ROOT%{pythonrhnroot}/common/usix.py $RPM_BUILD_ROOT%{python3rhnroot}/common %endif %if 0%{?suse_version} > 1140 %py_compile -O %{buildroot}/%{pythonrhnroot} %if 0%{?build_py3} %py3_compile -O %{buildroot}/%{python3rhnroot} %endif %endif %files %defattr(-,root,root) %dir %{pythonrhnroot} %dir %{pythonrhnroot}/common %{pythonrhnroot}/__init__.py %{pythonrhnroot}/common/__init__.py %{pythonrhnroot}/common/usix.py* %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} >= 1200 # These macros don't work on debbuild, but it doesn't matter because we don't do bytecompilation # until after install anyway. %exclude %{pythonrhnroot}/__init__.pyc %exclude %{pythonrhnroot}/__init__.pyo %exclude %{pythonrhnroot}/common/__init__.pyc %exclude %{pythonrhnroot}/common/__init__.pyo %endif %if 0%{?build_py3} %files -n python3-%{name} %dir %{python3rhnroot} %dir %{python3rhnroot}/common %dir %{python3rhnroot}/common/__pycache__ %{python3rhnroot}/__init__.py %{python3rhnroot}/common/__init__.py %{python3rhnroot}/common/usix.py* %{python3rhnroot}/common/__pycache__/* %if %{_vendor} != "debbuild" %exclude %{python3rhnroot}/__pycache__/* %exclude %{python3rhnroot}/common/__pycache__/__init__.* %endif %endif %if %{_vendor} == "debbuild" # Debian requires: # post: Do bytecompilation after install # preun: Remove any *.py[co] files %post -n python2-%{name} pycompile -p python2-%{name} -V -3.0 %preun -n python2-%{name} pyclean -p python2-%{name} %if 0%{?build_py3} %post -n python3-%{name} py3compile -p python3-%{name} -V -4.0 %preun -n python3-%{name} py3clean -p python3-%{name} %endif %endif %changelog 0707010000000A000041FD0000000000000000000000015CDC163600000000000000000000000000000000000000000000001500000000spacewalk-usix/tests0707010000000B000081B40000000000000000000000015CDC163600000418000000000000000000000000000000000000002900000000spacewalk-usix/tests/test_usix_common.py# coding: utf-8 """ Tests for usix. """ import sys import types import pytest from common import usix class TestUsixCommon: """ Tests for usix library. """ @pytest.mark.skipif(sys.version_info < (3, 0), reason="Requires Python 3.x") def test_types(self): """ Test py3 types """ assert usix.BufferType == usix.UnicodeType == bytes assert usix.StringType == str assert usix.DictType == dict assert usix.IntType == usix.IntType == int assert usix.ListType == list assert usix.ClassType == usix.TypeType == type assert usix.FloatType == float assert usix.TupleType == tuple assert usix.InstanceType == object def test_max_int(self): """ Test maximal size of an integer. """ assert usix.MaxInt == sys.maxsize def test_next_iterator(self): """ Test 'next' is defined. """ assert hasattr(usix, "next") assert type(usix.next) == types.BuiltinFunctionType 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor