mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
Merge branch 'travis' of https://github.com/crazyscientist/osc
Improve deployment via travis. Unfortunately, style + semantics changes are in a single commit... but let's not be too picky. See also the discussion in [1]. [1] https://github.com/openSUSE/osc/pull/739
This commit is contained in:
commit
01d235d998
15
.travis.yml
15
.travis.yml
@ -1,13 +1,18 @@
|
||||
language: python
|
||||
python:
|
||||
- '2.7'
|
||||
- '3.6'
|
||||
- '2.7'
|
||||
- '3.6'
|
||||
- '3.7'
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- diffstat
|
||||
- diffstat
|
||||
sudo: false
|
||||
script: cd tests; python suite.py
|
||||
before_script: cd $TRAVIS_BUILD_DIR/tests
|
||||
script: python suite.py
|
||||
before_deploy:
|
||||
- cd $TRAVIS_BUILD_DIR/
|
||||
- rm -rf $TRAVIS_BUILD_DIR/dist/*
|
||||
deploy:
|
||||
provider: pypi
|
||||
user: suse
|
||||
@ -15,5 +20,5 @@ deploy:
|
||||
secure: R4+YNPW2tsiY06hibGvONYn0//1z1QdcY8VmNbYpIRly4eTAbPE9uejKpyuflUkznpEkoqCdFzi5FNFhgat9N+AkIKyX9NTkf0oxaKKbdqBM7H1V8bqLYlAO479262spRyO0ee5fV5v6g81AFjncIV+pGjtQ0Vg/sjVcvGa61bs=
|
||||
on:
|
||||
tags: true
|
||||
distributions: sdist bdist_wheel
|
||||
distributions: sdist
|
||||
repo: openSUSE/osc
|
||||
|
4
MANIFEST.in
Normal file
4
MANIFEST.in
Normal file
@ -0,0 +1,4 @@
|
||||
include NEWS
|
||||
include README
|
||||
include AUTHORS
|
||||
include COPYING
|
87
setup.py
87
setup.py
@ -3,17 +3,19 @@
|
||||
from distutils.core import setup
|
||||
import distutils.core
|
||||
from distutils.command import build, install_data
|
||||
import gzip
|
||||
import os.path
|
||||
import osc.core
|
||||
import sys
|
||||
|
||||
import setuptools
|
||||
|
||||
import osc.core
|
||||
from osc import commandline
|
||||
from osc import babysitter
|
||||
|
||||
# optional support for py2exe
|
||||
try:
|
||||
import py2exe
|
||||
|
||||
HAVE_PY2EXE = True
|
||||
except:
|
||||
HAVE_PY2EXE = False
|
||||
@ -27,14 +29,13 @@ class build_osc(build.build, object):
|
||||
def build_man_page(self):
|
||||
"""
|
||||
"""
|
||||
import gzip
|
||||
man_path = os.path.join(self.build_base, 'osc.1.gz')
|
||||
distutils.log.info('generating %s' % man_path)
|
||||
outfile = gzip.open(man_path, 'wt')
|
||||
osccli = commandline.Osc(stdout=outfile)
|
||||
# FIXME: we cannot call the main method because osc expects an ~/.oscrc
|
||||
# file (this would break builds in environments like the obs)
|
||||
#osccli.main(argv = ['osc','man'])
|
||||
# osccli.main(argv = ['osc','man'])
|
||||
osccli.optparser = osccli.get_optparser()
|
||||
osccli.do_man(None)
|
||||
outfile.close()
|
||||
@ -60,11 +61,11 @@ class build_docs(distutils.core.Command):
|
||||
metadata = self.distribution.metadata
|
||||
# package_dir may be None, in that case use the current directory.
|
||||
src_dir = (self.distribution.package_dir or {'': ''})['']
|
||||
src_dir = os.path.join(os.getcwd(), src_dir)
|
||||
src_dir = os.path.join(os.getcwd(), src_dir)
|
||||
import sphinx
|
||||
sphinx.main(['runme',
|
||||
'-D', 'version=%s' % metadata.get_version(),
|
||||
os.path.join('docs',), os.path.join(self.built_docs, 'docs')])
|
||||
'-D', 'version=%s' % metadata.get_version(),
|
||||
os.path.join('docs', ), os.path.join(self.built_docs, 'docs')])
|
||||
|
||||
|
||||
# take a potential build-base option into account (for instance, if osc is
|
||||
@ -91,34 +92,62 @@ class install_data(install_data.install_data, object):
|
||||
|
||||
addparams = {}
|
||||
if HAVE_PY2EXE:
|
||||
addparams['console'] = [{'script': 'osc-wrapper.py', 'dest_base': 'osc', 'icon_resources': [(1, 'osc.ico')]}]
|
||||
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']}}
|
||||
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']))
|
||||
|
||||
setuptools.setup(name='osc',
|
||||
version = osc.core.__version__,
|
||||
description = 'openSUSE commander',
|
||||
long_description = 'Command-line client for the openSUSE Build Service, which allows to access repositories in the openSUSE Build Service in similar way as Subversion repositories.',
|
||||
author = 'openSUSE project',
|
||||
author_email = 'opensuse-buildservice@opensuse.org',
|
||||
license = 'GPL',
|
||||
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',
|
||||
download_url = 'https://github.com/openSUSE/osc',
|
||||
packages = ['osc', 'osc.util'],
|
||||
scripts = ['osc-wrapper.py'],
|
||||
data_files = data_files,
|
||||
with open("README") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
# Override certain command classes with our own ones
|
||||
cmdclass = {
|
||||
setuptools.setup(
|
||||
name='osc',
|
||||
version=osc.core.__version__,
|
||||
description='openSUSE commander',
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/plain",
|
||||
author='openSUSE project',
|
||||
author_email='opensuse-buildservice@opensuse.org',
|
||||
license='GPL',
|
||||
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',
|
||||
download_url='https://github.com/openSUSE/osc',
|
||||
packages=['osc', 'osc.util'],
|
||||
scripts=['osc-wrapper.py'],
|
||||
data_files=data_files,
|
||||
install_requires=['M2Crypto', 'chardet'],
|
||||
classifiers=[
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Environment :: Console",
|
||||
"Intended Audience :: Developers",
|
||||
"Intended Audience :: Information Technology",
|
||||
"Intended Audience :: System Administrators",
|
||||
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Topic :: Software Development :: Build Tools",
|
||||
"Topic :: System :: Archiving :: Packaging",
|
||||
],
|
||||
|
||||
|
||||
# Override certain command classes with our own ones
|
||||
cmdclass={
|
||||
'build': build_osc,
|
||||
'build_docs' : build_docs,
|
||||
'build_docs': build_docs,
|
||||
'install_data': install_data
|
||||
},
|
||||
**addparams
|
||||
)
|
||||
},
|
||||
**addparams
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user