From 6ed59860f0f54c44145d3b25a5f893e60680cc0f Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Jan 2022 15:03:23 +0100 Subject: [PATCH 1/3] setup.py: Fix license --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 118e8a5d..5f0abdb1 100755 --- a/setup.py +++ b/setup.py @@ -113,7 +113,7 @@ setuptools.setup( long_description_content_type="text/plain", author='openSUSE project', author_email='opensuse-buildservice@opensuse.org', - license='GPL', + license='GPLv2+', platforms=['Linux', 'Mac OSX', 'Windows XP/2000/NT', 'Windows 95/98/ME', 'FreeBSD'], keywords=['openSUSE', 'SUSE', 'RPM', 'build', 'buildservice'], url='http://en.opensuse.org/openSUSE:OSC', From 3b0c6603599359c343028a94cdd7d393b3ae3fd9 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Jan 2022 15:04:24 +0100 Subject: [PATCH 2/3] setup.py: Add py3.10 and py3.11 to the classifiers --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 5f0abdb1..0eee8e82 100755 --- a/setup.py +++ b/setup.py @@ -138,6 +138,8 @@ setuptools.setup( "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Software Development :: Build Tools", "Topic :: System :: Archiving :: Packaging", ], From 171b546379669eb5cb3238d1c412472fb295eeb2 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Jan 2022 15:06:24 +0100 Subject: [PATCH 3/3] Remove Windows from the supported operating systems The ':' character is used as a separator in Open Build Service and constantly appears in directory names after running osc commands. Windows do not support ':' as a valid character on file system. This breaks not only osc but also basic commands such as 'git clone' on a project that contains colons in paths. That's why we decided to make osc unsupported on Windows. --- osc/commandline.py | 2 -- osc/core.py | 12 ++---------- setup.py | 27 +++++---------------------- 3 files changed, 7 insertions(+), 34 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index b0452e66..524f32cc 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4653,8 +4653,6 @@ Please submit there instead, or use --nodevelproject to force direct submission. prj_dir = opts.output_dir if opts.output_dir else project if not opts.output_dir and conf.config['checkout_no_colon']: prj_dir = prj_dir.replace(':', '/') - if sys.platform[:3] == 'win': - prj_dir = prj_dir.replace(':', ';') if os.path.exists(prj_dir): sys.exit('osc: project directory \'%s\' already exists' % prj_dir) diff --git a/osc/core.py b/osc/core.py index 34337b9d..f930cb80 100644 --- a/osc/core.py +++ b/osc/core.py @@ -4082,8 +4082,6 @@ def _get_linux_distro(): def get_default_editor(): system = platform.system() - if system == 'Windows': - return 'notepad' if system == 'Linux': dist = _get_linux_distro() if dist == 'debian': @@ -4095,8 +4093,6 @@ def get_default_editor(): def get_default_pager(): system = platform.system() - if system == 'Windows': - return 'less' if system == 'Linux': dist = _get_linux_distro() if dist == 'debian': @@ -5061,12 +5057,8 @@ def checkout_package(apiurl, project, package, if not prj_dir: prj_dir = olddir - else: - if sys.platform[:3] == 'win': - prj_dir = prj_dir[:2] + prj_dir[2:].replace(':', ';') - else: - if conf.config['checkout_no_colon']: - prj_dir = prj_dir.replace(':', '/') + elif conf.config['checkout_no_colon']: + prj_dir = prj_dir.replace(':', '/') root_dots = '.' if conf.config['checkout_rooted']: diff --git a/setup.py b/setup.py index 0eee8e82..174ccbd2 100755 --- a/setup.py +++ b/setup.py @@ -5,21 +5,12 @@ import distutils.core from distutils.command import build, install_data import gzip import os.path -import sys import setuptools import osc.core from osc import commandline -# optional support for py2exe -try: - import py2exe - - HAVE_PY2EXE = True -except: - HAVE_PY2EXE = False - class build_osc(build.build, object): """ @@ -90,17 +81,8 @@ class install_data(install_data.install_data, object): self.data_files = data_files -addparams = {} -if HAVE_PY2EXE: - addparams['console'] = [ - {'script': 'osc-wrapper.py', 'dest_base': 'osc', 'icon_resources': [(1, 'osc.ico')]}] - addparams['zipfile'] = 'shared.lib' - addparams['options'] = {'py2exe': {'optimize': 0, 'compressed': True, - 'packages': ['xml.etree', 'StringIO', 'gzip']}} - data_files = [] -if sys.platform[:3] != 'win': - data_files.append((os.path.join('share', 'man', 'man1'), ['osc.1.gz'])) +data_files.append((os.path.join('share', 'man', 'man1'), ['osc.1.gz'])) with open("README") as fh: long_description = fh.read() @@ -114,7 +96,7 @@ setuptools.setup( author='openSUSE project', author_email='opensuse-buildservice@opensuse.org', license='GPLv2+', - platforms=['Linux', 'Mac OSX', 'Windows XP/2000/NT', 'Windows 95/98/ME', 'FreeBSD'], + platforms=['Linux', 'MacOS X', 'FreeBSD'], keywords=['openSUSE', 'SUSE', 'RPM', 'build', 'buildservice'], url='http://en.opensuse.org/openSUSE:OSC', download_url='https://github.com/openSUSE/osc', @@ -129,7 +111,9 @@ setuptools.setup( "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", - "Operating System :: OS Independent", + "Operating System :: MacOS :: MacOS X", + "Operating System :: POSIX :: BSD :: FreeBSD", + "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", @@ -151,5 +135,4 @@ setuptools.setup( 'build_docs': build_docs, 'install_data': install_data }, - **addparams )