1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-12 16:56:15 +01:00

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.
This commit is contained in:
Daniel Mach 2022-01-26 15:06:24 +01:00
parent 3b0c660359
commit 171b546379
3 changed files with 7 additions and 34 deletions

View File

@ -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)

View File

@ -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']:

View File

@ -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
)