PREFIX = "/usr/local"
endif
-all:
- python3 setup.py build
- cd bsr && python3 setup.py build && cd ..
-
tag:
git tag $(VERSION)
docs: man html pdf
-install: all
- python3 setup.py install --prefix=${PREFIX}
- cd bsr && python3 setup.py install --prefix=${PREFIX} && cd ..
-
clean:
rm -rf {build/,dist/,*.egg-info/}
cd bsr && rm -rf {build/,dist/,*.egg-info/} && cd ..
+
test:
nosetests -v --with-coverage --with-xunit
+
import subprocess
import shutil
-try:
- from configparser import SafeConfigParser
-except ImportError:
- from configparser import SafeConfigParser
+from configparser import ConfigParser
from bsr.utility.utils import pushd, console, list_all_directories
console('Use gbs configuration file from {}'.format(self.get_config_file()), \
self.verbose)
- parser = SafeConfigParser()
+ parser = ConfigParser()
parser.read(self.get_config_file())
conf_profile = parser.get('general', 'profile')
[metadata]
-license_file = LICENSE
+license_files = LICENSE
"""A setuptools based setup module.
"""
-from setuptools import setup, find_packages
+from setuptools import setup
import os
import sys
with open('README.md', 'r') as f:
readme = f.read()
-def package_files(directory):
- paths = []
- for (path, directories, filenames) in os.walk(directory):
- for filename in filenames:
- paths.append(os.path.join('..', path, filename))
- return paths
-
-extra_files = package_files('bsr/web_dist')
-
def check_debian():
"""--install-layout is recognized after 2.5"""
if sys.version_info[:2] > (2, 5):
author=about['__author__'],
author_email=about['__author_email__'],
url=about['__url__'],
- packages=find_packages(),
scripts=['bsr/bsr'],
+ packages=['bsr', 'bsr.analyzer', 'bsr.network', 'bsr.tests', 'bsr.report', 'bsr.utility', 'bsr.gbs',
+ 'bsr.web_dist', 'bsr.web_dist.images', 'bsr.web_dist.static.css',
+ 'bsr.web_dist.static.js', 'bsr.web_dist.static.media'],
package_data={
- '': ['LICENSE', 'NOTICE'] + extra_files,
- 'requests': ['*.pem']
+ '': ['LICENSE', 'NOTICE'],
+ 'requests': ['*.pem'],
+ 'bsr.web_dist': ["*.json", "*.html"],
+ 'bsr.web_dist.images': ["*.svg", "*.png"],
+ 'bsr.web_dist.static.css': ["*.css"],
+ 'bsr.web_dist.static.js': ["*.js", "*.txt"],
+ 'bsr.web_dist.static.media': ["*.woff2", "*.ttf", "*.svg", "*.woff", "*.eot", "*.png"],
},
- package_dir={'bsr': 'bsr'},
include_package_data=True,
python_requires=">=2.7.17, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
install_requires=requires,
[testenv]
commands =
- python setup.py test
+ pytest
python3-lxml,
sudo,
osc (>= 0.170.1),
- git-buildpackage-rpm (>= 0.9.28-tizen20231130),
+ git-buildpackage-rpm (>= 0.9.36+tizen20240605),
gbs-api (= ${binary:Version}),
gbs-export (= ${binary:Version}),
gbs-remotebuild (= ${binary:Version}),
-usr/lib/python*/*packages/bsr/*.py
-usr/lib/python*/*packages/bsr/analyzer/*.py
-usr/lib/python*/*packages/bsr/gbs/*.py
-usr/lib/python*/*packages/bsr/network/*.py
-usr/lib/python*/*packages/bsr/report/*.py
-usr/lib/python*/*packages/bsr/utility/*.py
-usr/lib/python*/*packages/bsr/web_dist/*
-usr/bin/bsr
+usr/local/lib/python*/*packages/bsr/*.py
+usr/local/lib/python*/*packages/bsr/analyzer/*.py
+usr/local/lib/python*/*packages/bsr/gbs/*.py
+usr/local/lib/python*/*packages/bsr/network/*.py
+usr/local/lib/python*/*packages/bsr/report/*.py
+usr/local/lib/python*/*packages/bsr/utility/*.py
+usr/local/lib/python*/*packages/bsr/web_dist/*
+usr/local/bin/bsr /usr/bin
override_dh_auto_install:
python3 setup.py install --root=debian/tmp --prefix=/usr
make man
- cd bsr && python3 setup.py install --root=../debian/tmp --prefix=/usr && cd ..
+ cd bsr && python3 setup.py install --root=../debian/tmp --prefix=/usr/local && cd ..
mkdir -p debian/tmp/usr/share/man/man1
mkdir -p debian/tmp/usr/share/gbs
install -m644 docs/gbs.1 debian/tmp/usr/share/man/man1
try:
build_env = os.environ
- build_env['PS1'] = "(tizen-build-env)@\h \W]\$ "
+ build_env['PS1'] = r"(tizen-build-env)@\h \W]\$ "
subprocess.call(cmd, env=build_env)
except OSError as err:
raise GbsError('failed to chroot to %s: %s' % (build_root, err))
conf_fn = os.path.join(repo.path, '.gbs.conf')
log.info('Updating local .gbs.conf')
with open(conf_fn, 'a+') as conf_fp:
- parser.readfp(conf_fp)
+ parser.read_file(conf_fp)
for section, items in list(values.items()):
for key, value in list(items.items()):
parser.set_into_file(section, key, value)
# This regular expression is created for parsing the
# results of of core.get_results()
stat_re = re.compile(r'^(?P<repo>\S+)\s+(?P<arch>\S+)\s+'
- '(?P<status>\S*)$')
+ r'(?P<status>\S*)$')
for res in build_status:
match = stat_re.match(res)
if match:
Requires: python3-lxml
Requires: sudo
Requires: osc >= 0.170.1
-Requires: tizen-gbp-rpm >= 20231130
+Requires: tizen-gbp-rpm >= 20240605
Requires: depanneur >= 0.16.24
%if ! 0%{?tizen_version:1}
import os, sys
import re
-from distutils.core import setup
+from setuptools import setup
MOD_NAME = 'gitbuildsys'
reload(gitbuildsys.conf)
parser = BrainConfigParser()
- parser.readfp(StringIO(conf.getvalue()))
+ parser.read_file(StringIO(conf.getvalue()))
name = parser.get('general', 'profile')
repos = parser.get(name, 'repos')