You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.5 KiB

--- a/SConstruct
+++ b/SConstruct
@@ -515,7 +515,7 @@ AddOption(
action='store', metavar='DIR', help='libdir name (lib or lib64)'
)
-for suffix in ['libelf', 'gettext', 'fiemap', 'blkid', 'json-glib', 'gui']:
+for suffix in ['libelf', 'gettext', 'fiemap', 'blkid', 'json-glib', 'gui', 'docs']:
AddOption(
'--without-' + suffix, action='store_const', default=False, const=False,
dest='with_' + suffix
@@ -804,7 +804,8 @@ env.Default(library)
SConscript('tests/SConscript', exports='programs')
SConscript('po/SConscript')
-SConscript('docs/SConscript')
+if GetOption("with_docs"):
+ SConscript('docs/SConscript')
SConscript('gui/SConscript')
@@ -883,7 +884,6 @@ if 'config' in COMMAND_LINE_TARGETS:
Find non-stripped binaries (needs libelf) : {libelf}
Optimize using ioctl(FS_IOC_FIEMAP) (needs linux) : {fiemap}
Support for SHA512 (needs glib >= 2.31) : {sha512}
- Build manpage from docs/rmlint.1.rst : {sphinx}
Support for caching checksums in file's xattr : {xattr}
Support for reading json caches (needs json-glib) : {json_glib}
Checking for proper support of big files >= 4GB : {bigfiles}
@@ -898,6 +898,9 @@ if 'config' in COMMAND_LINE_TARGETS:
(needs <locale.h> for compile side support) : {locale}
(needs msgfmt to compile .po files) : {msgfmt}
+ Enable GUI : {gui}
+ Build docs : {docs}
+
{grey}The following constants will be used during the build:{end}
Version information : {version}
@@ -925,6 +928,8 @@ Type 'scons' to actually compile rmlint now. Good luck.
bigfiles=yesno(env['HAVE_BIGFILES']),
bigofft=yesno(env['HAVE_BIG_OFF_T']),
bigstat=yesno(env['HAVE_BIG_STAT']),
+ gui=yesno(GetOption("with_gui")),
+ docs=yesno(GetOption("with_docs")),
sphinx=COLORS['green'] + 'yes, using ' + COLORS['end'] + sphinx_bin if sphinx_bin else yesno(sphinx_bin),
compiler=env['CC'],
prefix=GetOption('prefix'),
--- a/gui/setup.py
+++ b/gui/setup.py
@@ -37,7 +37,7 @@ def get_prefix():
PREFIX = get_prefix()
-class PrePlusPostInstall(install):
+class PreInstall(install):
def run(self):
# Compile the resource bundle freshly
print('==> Compiling resource bundle')
@@ -59,24 +59,6 @@ class PrePlusPostInstall(install):
# Run the usual distutils install routine:
install.run(self)
- # Make sure the schema file is updated.
- # Otherwise the gui will trace trap.
- print('==> Compiling GLib Schema files')
-
- try:
- subprocess.call([
- 'glib-compile-schemas',
- os.path.join(PREFIX, 'share/glib-2.0/schemas')
- ])
- except subprocess.CalledProcessError as err:
- print('==> Could not update schemas: ', err)
- print('==> Please run the following manually:\n')
- print(' sudo glib-compile-schemas {prefix}'.format(
- prefix=os.path.join(PREFIX, 'share/glib-2.0/schemas')
- ))
- else:
- print('==> OK!')
-
setup(
name='Shredder',
@@ -88,7 +70,7 @@ setup(
url='https://rmlint.rtfd.org',
license='GPLv3',
platforms='any',
- cmdclass={'install': PrePlusPostInstall},
+ cmdclass={'install': PreInstall},
packages=['shredder', 'shredder.views'],
package_data={'': [
'resources/*.gresource'