mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-13 01:06:15 +01:00
Merge pull request #1170 from dmach/fix-rtd-build
Fix Read the Docs build
This commit is contained in:
commit
9ebd8cf7f2
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,5 +1,6 @@
|
||||
.gitattributes export-ignore
|
||||
.github export-ignore
|
||||
.readthedocs.yaml export-ignore
|
||||
behave export-ignore
|
||||
contrib/build_rpm.py export-ignore
|
||||
contrib/osc.spec export-ignore
|
||||
|
17
.readthedocs.yaml
Normal file
17
.readthedocs.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
# .readthedocs.yaml
|
||||
# Read the Docs configuration file
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
|
||||
version: 2
|
||||
|
||||
build:
|
||||
os: ubuntu-20.04
|
||||
tools:
|
||||
python: "3.9"
|
||||
|
||||
sphinx:
|
||||
configuration: doc/conf.py
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: doc/requirements.txt
|
@ -1,4 +1,5 @@
|
||||
[![unit tests](https://github.com/openSUSE/osc/actions/workflows/unittests.yaml/badge.svg)](https://github.com/openSUSE/osc/actions/workflows/unittests.yaml)
|
||||
[![docs](https://readthedocs.org/projects/opensuse-commander/badge/?version=latest)](https://opensuse-commander.readthedocs.io/en/latest/?badge=latest)
|
||||
[![codecov](https://codecov.io/gh/openSUSE/osc/branch/master/graph/badge.svg)](https://codecov.io/gh/openSUSE/osc)
|
||||
[![code climate](https://codeclimate.com/github/openSUSE/osc.png)](https://codeclimate.com/github/openSUSE/osc)
|
||||
[![contributors](https://img.shields.io/github/contributors/openSUSE/osc.svg)](https://github.com/openSUSE/osc/graphs/contributors)
|
||||
|
2
doc/requirements.txt
Normal file
2
doc/requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
cryptography
|
||||
urllib3
|
@ -3,8 +3,6 @@ import os
|
||||
from tempfile import mkdtemp
|
||||
from shutil import rmtree
|
||||
|
||||
import rpm
|
||||
|
||||
|
||||
class KeyError(Exception):
|
||||
def __init__(self, key, *args):
|
||||
@ -18,6 +16,7 @@ class KeyError(Exception):
|
||||
|
||||
class Checker:
|
||||
def __init__(self):
|
||||
import rpm
|
||||
self.dbdir = mkdtemp(prefix='oscrpmdb')
|
||||
self.imported = {}
|
||||
rpm.addMacro('_dbpath', self.dbdir)
|
||||
@ -28,6 +27,7 @@ class Checker:
|
||||
# self.ts.Debug(1)
|
||||
|
||||
def readkeys(self, keys=None):
|
||||
import rpm
|
||||
keys = keys or []
|
||||
rpm.addMacro('_dbpath', self.dbdir)
|
||||
for key in keys:
|
||||
@ -39,6 +39,7 @@ class Checker:
|
||||
if not self.imported:
|
||||
raise KeyError('', "no key imported")
|
||||
|
||||
import rpm
|
||||
rpm.delMacro("_dbpath")
|
||||
|
||||
# python is an idiot
|
||||
|
Loading…
Reference in New Issue
Block a user