mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-11 07:06:16 +01:00
Merge pull request #995 from dmach/setup-py-fixes
Drop Windows from supported operating systems
This commit is contained in:
commit
fe6a50ffb7
@ -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
|
prj_dir = opts.output_dir if opts.output_dir else project
|
||||||
if not opts.output_dir and conf.config['checkout_no_colon']:
|
if not opts.output_dir and conf.config['checkout_no_colon']:
|
||||||
prj_dir = prj_dir.replace(':', '/')
|
prj_dir = prj_dir.replace(':', '/')
|
||||||
if sys.platform[:3] == 'win':
|
|
||||||
prj_dir = prj_dir.replace(':', ';')
|
|
||||||
if os.path.exists(prj_dir):
|
if os.path.exists(prj_dir):
|
||||||
sys.exit('osc: project directory \'%s\' already exists' % prj_dir)
|
sys.exit('osc: project directory \'%s\' already exists' % prj_dir)
|
||||||
|
|
||||||
|
10
osc/core.py
10
osc/core.py
@ -4082,8 +4082,6 @@ def _get_linux_distro():
|
|||||||
|
|
||||||
def get_default_editor():
|
def get_default_editor():
|
||||||
system = platform.system()
|
system = platform.system()
|
||||||
if system == 'Windows':
|
|
||||||
return 'notepad'
|
|
||||||
if system == 'Linux':
|
if system == 'Linux':
|
||||||
dist = _get_linux_distro()
|
dist = _get_linux_distro()
|
||||||
if dist == 'debian':
|
if dist == 'debian':
|
||||||
@ -4095,8 +4093,6 @@ def get_default_editor():
|
|||||||
|
|
||||||
def get_default_pager():
|
def get_default_pager():
|
||||||
system = platform.system()
|
system = platform.system()
|
||||||
if system == 'Windows':
|
|
||||||
return 'less'
|
|
||||||
if system == 'Linux':
|
if system == 'Linux':
|
||||||
dist = _get_linux_distro()
|
dist = _get_linux_distro()
|
||||||
if dist == 'debian':
|
if dist == 'debian':
|
||||||
@ -5061,11 +5057,7 @@ def checkout_package(apiurl, project, package,
|
|||||||
|
|
||||||
if not prj_dir:
|
if not prj_dir:
|
||||||
prj_dir = olddir
|
prj_dir = olddir
|
||||||
else:
|
elif conf.config['checkout_no_colon']:
|
||||||
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(':', '/')
|
prj_dir = prj_dir.replace(':', '/')
|
||||||
|
|
||||||
root_dots = '.'
|
root_dots = '.'
|
||||||
|
31
setup.py
31
setup.py
@ -5,21 +5,12 @@ import distutils.core
|
|||||||
from distutils.command import build, install_data
|
from distutils.command import build, install_data
|
||||||
import gzip
|
import gzip
|
||||||
import os.path
|
import os.path
|
||||||
import sys
|
|
||||||
|
|
||||||
import setuptools
|
import setuptools
|
||||||
|
|
||||||
import osc.core
|
import osc.core
|
||||||
from osc import commandline
|
from osc import commandline
|
||||||
|
|
||||||
# optional support for py2exe
|
|
||||||
try:
|
|
||||||
import py2exe
|
|
||||||
|
|
||||||
HAVE_PY2EXE = True
|
|
||||||
except:
|
|
||||||
HAVE_PY2EXE = False
|
|
||||||
|
|
||||||
|
|
||||||
class build_osc(build.build, object):
|
class build_osc(build.build, object):
|
||||||
"""
|
"""
|
||||||
@ -90,17 +81,8 @@ class install_data(install_data.install_data, object):
|
|||||||
self.data_files = data_files
|
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 = []
|
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:
|
with open("README") as fh:
|
||||||
long_description = fh.read()
|
long_description = fh.read()
|
||||||
@ -113,8 +95,8 @@ setuptools.setup(
|
|||||||
long_description_content_type="text/plain",
|
long_description_content_type="text/plain",
|
||||||
author='openSUSE project',
|
author='openSUSE project',
|
||||||
author_email='opensuse-buildservice@opensuse.org',
|
author_email='opensuse-buildservice@opensuse.org',
|
||||||
license='GPL',
|
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'],
|
keywords=['openSUSE', 'SUSE', 'RPM', 'build', 'buildservice'],
|
||||||
url='http://en.opensuse.org/openSUSE:OSC',
|
url='http://en.opensuse.org/openSUSE:OSC',
|
||||||
download_url='https://github.com/openSUSE/osc',
|
download_url='https://github.com/openSUSE/osc',
|
||||||
@ -129,7 +111,9 @@ setuptools.setup(
|
|||||||
"Intended Audience :: Information Technology",
|
"Intended Audience :: Information Technology",
|
||||||
"Intended Audience :: System Administrators",
|
"Intended Audience :: System Administrators",
|
||||||
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
|
"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",
|
||||||
"Programming Language :: Python :: 2.7",
|
"Programming Language :: Python :: 2.7",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
@ -138,6 +122,8 @@ setuptools.setup(
|
|||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
"Topic :: Software Development :: Build Tools",
|
"Topic :: Software Development :: Build Tools",
|
||||||
"Topic :: System :: Archiving :: Packaging",
|
"Topic :: System :: Archiving :: Packaging",
|
||||||
],
|
],
|
||||||
@ -149,5 +135,4 @@ setuptools.setup(
|
|||||||
'build_docs': build_docs,
|
'build_docs': build_docs,
|
||||||
'install_data': install_data
|
'install_data': install_data
|
||||||
},
|
},
|
||||||
**addparams
|
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user