Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
u committed Jan 8, 2025
1 parent a2a2013 commit 25b9e4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions py2pack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,22 @@
get_metadata)
import io
from email import parser
from packaging.requirements import Requirement

try:
import libarchive
except ModuleNotFoundError:
libarchive = None

DEFAULT_TEMPLATE = 'opensuse.spec'
try:
import distro
DEFAULT_TEMPLATE = {
'fedora': 'fedora.spec',
'debian': 'opensuse.dsc',
'mageia': 'mageia.spec'
}.get(distro.id(), DEFAULT_TEMPLATE)
}.get(distro.id(), 'opensuse.spec')
except ModuleNotFoundError:
pass
DEFAULT_TEMPLATE = 'opensuse.spec'


def replace_string(output_string, replaces):
Expand Down

0 comments on commit 25b9e4c

Please sign in to comment.