setup: use absolute paths when building icons (#8383)
This commit is contained in:
parent
002d6cf922
commit
2e534d26fd
7
setup.py
7
setup.py
|
@ -9,13 +9,14 @@ import subprocess
|
|||
import tempfile
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
||||
from distutils.cmd import Command
|
||||
from setuptools.command.install_lib import install_lib as _install_lib
|
||||
from distutils.command.build import build as _build
|
||||
from distutils.command.sdist import sdist
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
class eo_sdist(sdist):
|
||||
|
||||
def run(self):
|
||||
|
@ -86,7 +87,7 @@ class build_icons(Command):
|
|||
pass
|
||||
|
||||
def run(self):
|
||||
destpath = 'gadjo/static/css/icons/'
|
||||
destpath = os.path.join(BASE_DIR, 'gadjo/static/css/icons/')
|
||||
if not os.path.exists(destpath):
|
||||
os.mkdir(destpath)
|
||||
variants = {
|
||||
|
@ -98,7 +99,7 @@ class build_icons(Command):
|
|||
'css': 'ul.apps li.icon-%(name)s a:hover { background-image: url(icons/%(filename)s); }'},
|
||||
}
|
||||
css_rules = []
|
||||
for basepath, dirnames, filenames in os.walk('icons'):
|
||||
for basepath, dirnames, filenames in os.walk(os.path.join(BASE_DIR, 'icons')):
|
||||
for filename in filenames:
|
||||
basename = os.path.splitext(filename)[0]
|
||||
for variant in variants:
|
||||
|
|
Loading…
Reference in New Issue