Verified Commit 1ce121d4 authored by tallero's avatar tallero

Basic meson build

parent 970c3394
Pipeline #182966 failed with stage
in 28 seconds
.buildconfig
.flatpak-builder
.ipynb_checkpoints
_build
__pycache__
\#*
dist
......
# This is the build file for project "daty"
# It is autogenerated by the Meson build system.
# Do not edit by hand.
ninja_required_version = 1.5.1
# Rules for compiling.
# Rules for linking.
# Other rules
rule CUSTOM_COMMAND
command = $COMMAND
description = $DESC
restat = 1
rule REGENERATE_BUILD
command = /usr/bin/meson --internal regenerate /home/desktopper/Projects/Daty /home/desktopper/Projects/Daty/_build --backend ninja
description = Regenerating build files.
generator = 1
# Phony build target, always out of date
build PHONY: phony
# Build rules for targets
# Test rules
build meson-test: CUSTOM_COMMAND all PHONY
COMMAND = /usr/bin/meson test --no-rebuild --print-errorlogs
DESC = Running$ all$ tests.
pool = console
build test: phony meson-test
build meson-benchmark: CUSTOM_COMMAND all PHONY
COMMAND = /usr/bin/meson test --benchmark --logbase benchmarklog --num-processes=1 --no-rebuild
DESC = Running$ benchmark$ suite.
pool = console
build benchmark: phony meson-benchmark
# Install rules
build meson-install: CUSTOM_COMMAND PHONY | all
DESC = Installing$ files.
COMMAND = /usr/bin/meson install --no-rebuild
pool = console
build install: phony meson-install
build meson-dist: CUSTOM_COMMAND PHONY
DESC = Creating$ source$ packages
COMMAND = /usr/bin/meson --internal dist /home/desktopper/Projects/Daty /home/desktopper/Projects/Daty/_build /usr/bin/meson
pool = console
build dist: phony meson-dist
# Suffix
build meson-scan-build: CUSTOM_COMMAND PHONY
COMMAND = /usr/bin/meson --internal scanbuild /home/desktopper/Projects/Daty /home/desktopper/Projects/Daty/_build /usr/bin/meson
pool = console
build scan-build: phony meson-scan-build
build meson-uninstall: CUSTOM_COMMAND PHONY
COMMAND = /usr/bin/meson --internal uninstall
pool = console
build uninstall: phony meson-uninstall
build all: phony
build clean: phony meson-clean
build meson-clean: CUSTOM_COMMAND PHONY
COMMAND = /usr/bin/ninja -t clean
description = Cleaning.
build build.ninja: REGENERATE_BUILD ../meson.build meson-private/coredata.dat
pool = console
build reconfigure: REGENERATE_BUILD PHONY
pool = console
build ../meson.build meson-private/coredata.dat: phony
default all
[{"name": "auto_features", "value": "auto", "section": "core", "machine": "any", "choices": ["enabled", "disabled", "auto"], "type": "combo", "description": "Override value of all 'auto' features"}, {"name": "backend", "value": "ninja", "section": "core", "machine": "any", "choices": ["ninja", "vs", "vs2010", "vs2015", "vs2017", "vs2019", "xcode"], "type": "combo", "description": "Backend to use"}, {"name": "buildtype", "value": "debug", "section": "core", "machine": "any", "choices": ["plain", "debug", "debugoptimized", "release", "minsize", "custom"], "type": "combo", "description": "Build type to use"}, {"name": "debug", "value": true, "section": "core", "machine": "any", "type": "boolean", "description": "Debug"}, {"name": "default_library", "value": "shared", "section": "core", "machine": "any", "choices": ["shared", "static", "both"], "type": "combo", "description": "Default library type"}, {"name": "install_umask", "value": 18, "section": "core", "machine": "any", "type": "integer", "description": "Default umask to apply on permissions of installed files"}, {"name": "layout", "value": "mirror", "section": "core", "machine": "any", "choices": ["mirror", "flat"], "type": "combo", "description": "Build directory layout"}, {"name": "optimization", "value": "0", "section": "core", "machine": "any", "choices": ["0", "g", "1", "2", "3", "s"], "type": "combo", "description": "Optimization level"}, {"name": "strip", "value": false, "section": "core", "machine": "any", "type": "boolean", "description": "Strip targets on install"}, {"name": "unity", "value": "off", "section": "core", "machine": "any", "choices": ["on", "off", "subprojects"], "type": "combo", "description": "Unity build"}, {"name": "warning_level", "value": "1", "section": "core", "machine": "any", "choices": ["0", "1", "2", "3"], "type": "combo", "description": "Compiler warning level to use"}, {"name": "werror", "value": false, "section": "core", "machine": "any", "type": "boolean", "description": "Treat warnings as errors"}, {"name": "wrap_mode", "value": "default", "section": "core", "machine": "any", "choices": ["default", "nofallback", "nodownload", "forcefallback"], "type": "combo", "description": "Wrap mode"}, {"name": "cmake_prefix_path", "value": [], "section": "core", "machine": "host", "type": "array", "description": "List of additional prefixes for cmake to search"}, {"name": "pkg_config_path", "value": [], "section": "core", "machine": "host", "type": "array", "description": "List of additional paths for pkg-config to search"}, {"name": "build.cmake_prefix_path", "value": [], "section": "core", "machine": "build", "type": "array", "description": "List of additional prefixes for cmake to search"}, {"name": "build.pkg_config_path", "value": [], "section": "core", "machine": "build", "type": "array", "description": "List of additional paths for pkg-config to search"}, {"name": "backend_max_links", "value": 0, "section": "backend", "machine": "any", "type": "integer", "description": "Maximum number of linker processes to run or 0 for no limit"}, {"name": "b_asneeded", "value": true, "section": "base", "machine": "any", "type": "boolean", "description": "Use -Wl,--as-needed when linking"}, {"name": "b_colorout", "value": "always", "section": "base", "machine": "any", "choices": ["auto", "always", "never"], "type": "combo", "description": "Use colored output"}, {"name": "b_coverage", "value": false, "section": "base", "machine": "any", "type": "boolean", "description": "Enable coverage tracking."}, {"name": "b_lto", "value": false, "section": "base", "machine": "any", "type": "boolean", "description": "Use link time optimization"}, {"name": "b_lundef", "value": true, "section": "base", "machine": "any", "type": "boolean", "description": "Use -Wl,--no-undefined when linking"}, {"name": "b_ndebug", "value": "false", "section": "base", "machine": "any", "choices": ["true", "false", "if-release"], "type": "combo", "description": "Disable asserts"}, {"name": "b_pch", "value": true, "section": "base", "machine": "any", "type": "boolean", "description": "Use precompiled headers"}, {"name": "b_pgo", "value": "off", "section": "base", "machine": "any", "choices": ["off", "generate", "use"], "type": "combo", "description": "Use profile guided optimization"}, {"name": "b_pie", "value": false, "section": "base", "machine": "any", "type": "boolean", "description": "Build executables as position independent"}, {"name": "b_sanitize", "value": "none", "section": "base", "machine": "any", "choices": ["none", "address", "thread", "undefined", "memory", "address,undefined"], "type": "combo", "description": "Code sanitizer to use"}, {"name": "b_staticpic", "value": true, "section": "base", "machine": "any", "type": "boolean", "description": "Build static libraries as position independent"}, {"name": "c_args", "value": [], "section": "compiler", "machine": "host", "type": "array", "description": "Extra arguments passed to the C compiler"}, {"name": "c_link_args", "value": [], "section": "compiler", "machine": "host", "type": "array", "description": "Extra arguments passed to the C linker"}, {"name": "c_std", "value": "none", "section": "compiler", "machine": "host", "choices": ["none", "c89", "c99", "c11", "c17", "c18", "gnu89", "gnu99", "gnu11", "gnu17", "gnu18"], "type": "combo", "description": "C language standard to use"}, {"name": "build.c_args", "value": [], "section": "compiler", "machine": "build", "type": "array", "description": "Extra arguments passed to the C compiler"}, {"name": "build.c_link_args", "value": [], "section": "compiler", "machine": "build", "type": "array", "description": "Extra arguments passed to the C linker"}, {"name": "build.c_std", "value": "none", "section": "compiler", "machine": "build", "choices": ["none", "c89", "c99", "c11", "c17", "c18", "gnu89", "gnu99", "gnu11", "gnu17", "gnu18"], "type": "combo", "description": "C language standard to use"}, {"name": "bindir", "value": "bin", "section": "directory", "machine": "any", "type": "string", "description": "Executable directory"}, {"name": "datadir", "value": "share", "section": "directory", "machine": "any", "type": "string", "description": "Data file directory"}, {"name": "includedir", "value": "include", "section": "directory", "machine": "any", "type": "string", "description": "Header file directory"}, {"name": "infodir", "value": "share/info", "section": "directory", "machine": "any", "type": "string", "description": "Info page directory"}, {"name": "libdir", "value": "lib", "section": "directory", "machine": "any", "type": "string", "description": "Library directory"}, {"name": "libexecdir", "value": "libexec", "section": "directory", "machine": "any", "type": "string", "description": "Library executable directory"}, {"name": "localedir", "value": "share/locale", "section": "directory", "machine": "any", "type": "string", "description": "Locale data directory"}, {"name": "localstatedir", "value": "/var", "section": "directory", "machine": "any", "type": "string", "description": "Localstate data directory"}, {"name": "mandir", "value": "share/man", "section": "directory", "machine": "any", "type": "string", "description": "Manual page directory"}, {"name": "prefix", "value": "/usr", "section": "directory", "machine": "any", "type": "string", "description": "Installation prefix"}, {"name": "sbindir", "value": "sbin", "section": "directory", "machine": "any", "type": "string", "description": "System executable directory"}, {"name": "sharedstatedir", "value": "/var/lib", "section": "directory", "machine": "any", "type": "string", "description": "Architecture-independent data directory"}, {"name": "sysconfdir", "value": "/etc", "section": "directory", "machine": "any", "type": "string", "description": "Sysconf data directory"}, {"name": "errorlogs", "value": true, "section": "test", "machine": "any", "type": "boolean", "description": "Whether to print the logs from failing tests"}, {"name": "stdsplit", "value": true, "section": "test", "machine": "any", "type": "boolean", "description": "Split stdout and stderr in test logs"}]
\ No newline at end of file
["/home/desktopper/Projects/Daty/meson.build", "/home/desktopper/Projects/Daty/daty/resources/meson.build"]
\ No newline at end of file
[{"name": "glib-2.0", "compile_args": ["-I/usr/include/glib-2.0", "-I/usr/lib/glib-2.0/include"], "link_args": ["/usr/lib/libglib-2.0.so"]}, {"name": "gobject-2.0", "compile_args": ["-I/usr/include/glib-2.0", "-I/usr/lib/glib-2.0/include", "-I/usr/lib/libffi-3.2.1/include"], "link_args": ["/usr/lib/libgobject-2.0.so", "/usr/lib/libglib-2.0.so"]}, {"name": "gobject-introspection-1.0", "compile_args": ["-I/usr/include/gobject-introspection-1.0", "-I/usr/lib/libffi-3.2.1/include", "-I/usr/include/glib-2.0", "-I/usr/lib/glib-2.0/include", "-pthread"], "link_args": ["/usr/lib/libgirepository-1.0.so", "/usr/lib/libgobject-2.0.so", "/usr/lib/libglib-2.0.so"]}, {"name": "gmodule-2.0", "compile_args": ["-pthread", "-I/usr/include/glib-2.0", "-I/usr/lib/glib-2.0/include"], "link_args": ["-Wl,--export-dynamic", "-pthread", "/usr/lib/libgmodule-2.0.so", "/usr/lib/libglib-2.0.so"]}, {"name": "gtk+-3.0", "compile_args": ["-I/usr/include/gtk-3.0", "-I/usr/include/pango-1.0", "-I/usr/include/glib-2.0", "-I/usr/lib/glib-2.0/include", "-I/usr/lib/libffi-3.2.1/include", "-I/usr/include/harfbuzz", "-I/usr/include/fribidi", "-I/usr/include/freetype2", "-I/usr/include/libpng16", "-I/usr/include/uuid", "-I/usr/include/cairo", "-I/usr/include/pixman-1", "-I/usr/include/gdk-pixbuf-2.0", "-I/usr/include/libmount", "-I/usr/include/blkid", "-I/usr/include/gio-unix-2.0", "-I/usr/include/libdrm", "-I/usr/include/atk-1.0", "-I/usr/include/at-spi2-atk/2.0", "-I/usr/include/at-spi-2.0", "-I/usr/include/dbus-1.0", "-I/usr/lib/dbus-1.0/include", "-pthread"], "link_args": ["/usr/lib/libgtk-3.so", "/usr/lib/libgdk-3.so", "/usr/lib/libz.so", "/usr/lib/libpangocairo-1.0.so", "/usr/lib/libpango-1.0.so", "/usr/lib/libharfbuzz.so", "/usr/lib/libatk-1.0.so", "/usr/lib/libcairo-gobject.so", "/usr/lib/libcairo.so", "/usr/lib/libgdk_pixbuf-2.0.so", "/usr/lib/libgio-2.0.so", "/usr/lib/libgobject-2.0.so", "/usr/lib/libglib-2.0.so"]}, {"name": "libhandy-0.0", "compile_args": ["-I/usr/include/libhandy-0.0", "-I/usr/include/gtk-3.0", "-I/usr/include/pango-1.0", "-I/usr/include/glib-2.0", "-I/usr/lib/glib-2.0/include", "-I/usr/lib/libffi-3.2.1/include", "-I/usr/include/harfbuzz", "-I/usr/include/fribidi", "-I/usr/include/freetype2", "-I/usr/include/libpng16", "-I/usr/include/uuid", "-I/usr/include/cairo", "-I/usr/include/pixman-1", "-I/usr/include/gdk-pixbuf-2.0", "-I/usr/include/libmount", "-I/usr/include/blkid", "-I/usr/include/gio-unix-2.0", "-I/usr/include/libdrm", "-I/usr/include/atk-1.0", "-I/usr/include/at-spi2-atk/2.0", "-I/usr/include/at-spi-2.0", "-I/usr/include/dbus-1.0", "-I/usr/lib/dbus-1.0/include", "-pthread"], "link_args": ["/usr/lib/libhandy-0.0.so", "/usr/lib/libgtk-3.so", "/usr/lib/libgdk-3.so", "/usr/lib/libz.so", "/usr/lib/libpangocairo-1.0.so", "/usr/lib/libpango-1.0.so", "/usr/lib/libharfbuzz.so", "/usr/lib/libatk-1.0.so", "/usr/lib/libcairo-gobject.so", "/usr/lib/libcairo.so", "/usr/lib/libgdk_pixbuf-2.0.so", "/usr/lib/libgio-2.0.so", "/usr/lib/libgobject-2.0.so", "/usr/lib/libglib-2.0.so"]}]
\ No newline at end of file
{"version": "undefined", "descriptive_name": "daty", "subproject_dir": "subprojects", "subprojects": []}
\ No newline at end of file
[]
\ No newline at end of file
{"meson_version": {"full": "0.51.2", "major": 0, "minor": 51, "patch": 2}, "directories": {"source": "/home/desktopper/Projects/Daty", "build": "/home/desktopper/Projects/Daty/_build", "info": "/home/desktopper/Projects/Daty/_build/meson-info"}, "introspection": {"version": {"full": "1.0.0", "major": 1, "minor": 0, "patch": 0}, "information": {"benchmarks": {"file": "intro-benchmarks.json", "updated": true}, "buildoptions": {"file": "intro-buildoptions.json", "updated": true}, "buildsystem_files": {"file": "intro-buildsystem_files.json", "updated": true}, "dependencies": {"file": "intro-dependencies.json", "updated": true}, "installed": {"file": "intro-installed.json", "updated": true}, "projectinfo": {"file": "intro-projectinfo.json", "updated": true}, "targets": {"file": "intro-targets.json", "updated": true}, "tests": {"file": "intro-tests.json", "updated": true}}}, "build_files_updated": true, "error": false}
\ No newline at end of file
Build started at 2019-09-21T17:38:50.977511
Main binary: /usr/bin/python
Python system: Linux
The Meson build system
Version: 0.51.2
Source dir: /home/desktopper/Projects/Daty
Build dir: /home/desktopper/Projects/Daty/_build
Build type: native build
Project name: daty
Project version: undefined
C compiler for the host machine: cc (gcc 9.1.0 "cc (GCC) 9.1.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Message: Looking for dependencies
Program python3 found: YES (/usr/bin/python3)
Dependency glib-2.0 found: YES (cached)
Dependency gobject-2.0 found: YES (cached)
Dependency gobject-introspection-1.0 found: YES (cached)
Dependency gmodule-2.0 found: YES (cached)
Dependency gtk+-3.0 found: YES (cached)
Dependency libhandy-0.0 found: YES (cached)
Message: Getting python install dir
Running command: /usr/bin/python3 -c from distutils.sysconfig import get_python_lib; print(get_python_lib())
--- stdout ---
/usr/lib/python3.7/site-packages
--- stderr ---
Build targets in project: 0
Found ninja-1.9.0 at /usr/bin/ninja
[options]
prefix = /usr
[properties]
int main() { int class=0; return class; }
../daty/resources/daty.gresource.xml
\ No newline at end of file
../daty/resources/gtk
\ No newline at end of file
icon_themes = ['hicolor']
foreach theme : icon_themes
install_subdir(theme, install_dir: 'share/icons/')
endforeach
gnome = import('gnome')
message('Compiling resources')
gnome.compile_resources(
meson.project_name(),
meson.project_name() + '.gresource.xml',
gresource_bundle: true,
source_dir: '.',
install_dir: DATA_DIR,
install: true,
# dependencies: configure_file(
# input: 'AboutDialog.ui.in',
# output: 'AboutDialog.ui',
# configuration: conf
# )
)
# Installing the schema file
# install_data(
# project_id + '.gschema.xml',
# install_dir: 'share/glib-2.0/schemas'
# )
# Merging the translations with the desktop file
i18n.merge_file(
output: project_id + '.desktop',
input: project_id + '.desktop.in',
po_dir: join_paths(meson.source_root(), 'daty/po'),
type: 'desktop',
install: true,
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'applications')
)
# Validating the desktop file
desktop_file_validate = find_program('desktop-file-validate', required:false)
if desktop_file_validate.found()
test (
'Validate desktop file',
desktop_file_validate,
args: join_paths(meson.current_build_dir (), project_id + '.desktop')
)
endif
# Merging the translations with the appdata file
# i18n.merge_file(
# output: project_id + '.appdata.xml',
# input: project_id + '.appdata.xml.in',
# po_dir: join_paths(meson.source_root(), 'subprojects/po'),
# install: true,
# install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'metainfo')
# )
# Validating the appdata file
# appstreamcli = find_program('appstream-util', required: false)
# if appstreamcli.found()
# test (
# 'Validate appdata file',
# appstreamcli,
# args: ['validate', '--nonet', join_paths(meson.current_build_dir (), project_id + '.appdata.xml')]
# )
# endif
# Validating schemas
# compile_schemas = find_program('glib-compile-schemas', required: false)
# if compile_schemas.found()
# test('Validate schema file', compile_schemas,
# args: ['--strict', '--dry-run', meson.current_source_dir()]
# )
# endif
# message('Installing man-page')
# install_man('lollypop.1')
message('Making a list of icons')
subdir('icons')
ml.prevete.Daty.desktop
\ No newline at end of file
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from daty import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
# Set of available languages.
it_IT
......@@ -37,7 +37,7 @@
</gresource>
<gresource prefix="/ml/prevete/Daty/icons">
<file compressed="true" alias="ml.prevete.Daty.svg">icons/scalable/apps/ml.prevete.Daty.svg</file>
<file compressed="true" alias="ml.prevete.Daty-symbolic.svg">icons/scalable/apps/ml.prevete.Daty-symbolic.svg</file>
<file compressed="true" alias="ml.prevete.Daty.svg">icons/hicolor/scalable/apps/ml.prevete.Daty.svg</file>
<file compressed="true" alias="ml.prevete.Daty-symbolic.svg">icons/hicolor/scalable/apps/ml.prevete.Daty-symbolic.svg</file>
</gresource>
</gresources>
../../data/icons
\ No newline at end of file
gnome = import('gnome')
# message('TODO: Compiling resources')
# gnome.compile_resources(
# 'daty', 'daty.gresource.xml',
# source_dir : '.',
# c_name : 'daty',
# install_dir : python_dir,
# install: true)
message('Compiling schemas')
gnome.compile_schemas()
install_data(
'org.gnome.Music.gschema.xml',
install_dir : 'share/glib-2.0/schemas')
message('TODO: Making a .desktop file')
message('TODO: Preparing appdata')
message('Install a man page')
install_man('gnome-music.1')
message('TODO: Making a list of icons')
icon_names = []
icon_themes = ['hicolor', 'HighContrast']
icon_sizes = ['16', '22', '32', '48', '256']
foreach theme : icon_themes
foreach size: icon_sizes
icon_names = icon_names + ['icons/' + theme + '/' + size + 'x' + size + '/apps/gnome-music.png']
endforeach
endforeach
icon_names = icon_names + ['icons/hicolor/gnome-music.svg']
install_data(icon_names, install_dir : 'share')
# See https://github.com/mesonbuild/meson/issues/226
project('daty', 'c')
version = '3.35.1'
version = '3.37.1'
project_id = 'ml.prevete.Daty'
i18n = import('i18n')
DATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
bindir = join_paths(get_option('prefix'), get_option('bindir'))
# Configuration params
conf = configuration_data()
conf.set('PACKAGE_VERSION', version)
conf.set('PACKAGE_URL', 'https://wiki.gnome.org/World/Daty')
conf.set('DATA_DIR', DATA_DIR)
message('Looking for dependencies')
py3 = find_program('python3')
......@@ -24,7 +32,7 @@ if r.returncode() != 0
endif
python_dir = r.stdout().strip()
#
# subdir('daty')
subdir('data')
# subdir('po')
# subdir('help')
#
......@@ -56,9 +64,21 @@ python_dir = r.stdout().strip()
# message('TODO: Generate authors list')
#
install_subdir('daty', install_dir: python_dir)
message('Preparing init file')
configure_file(
input: 'daty.in',
output: 'daty',
configuration: conf,
install_dir: bindir
)
#
# message('Preparing init file')
# configure_file(input : 'gnome-music.in', output : 'gnome-music', configuration : conf)
# install_data('daty', install_dir: 'bin')
#
meson.add_install_script('meson_post_install.py')
# meson.set_install_script('meson_install.sh')
#!/usr/bin/env python3
from os import environ, path
from subprocess import call
prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = path.join(prefix, 'share')
destdir = environ.get('DESTDIR', '')
if not destdir:
print('Updating icon cache...')
call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])
print("Installing new Schemas")
call(['glib-compile-schemas', path.join(datadir, 'glib-2.0/schemas')])
from os import walk
from os.path import join
from pathlib import Path
from pprint import pprint
from setuptools import setup, find_packages
from subprocess import check_output as sh
......@@ -38,20 +39,58 @@ def help():
raise e
return build
# GResources
try:
sh(['daty/resources/compile-resources.sh'])
print("Gresources compiled")
except Exception as e:
print("WARNING: to compile gresource be sure to have \"glib-compile-resources\" in your $PATH")
data_files = [
('share/applications', ['daty/resources/ml.prevete.Daty.desktop']),
('share/icons/hicolor/scalable/apps', ['daty/resources/icons/scalable/apps/ml.prevete.Daty.svg']),
('share/icons/hicolor/scalable/apps', ['daty/resources/icons/scalable/apps/ml.prevete.Daty-symbolic.svg']),
('share/icons/hicolor/scalable/places', ['daty/resources/icons/scalable/places/discussion-page-symbolic.svg']),
('share/icons/hicolor/48x48/apps', ['daty/resources/icons/48x48/apps/ml.prevete.Daty.png']),
('share/icons/hicolor/16x16/apps', ['daty/resources/icons/16x16/apps/ml.prevete.Daty-symbolic.png'])
]
# Variables
theme_dir = "daty/resources/icons/hicolor"
hicolor_path = "share/icons/hicolor"
# Auxiliary functions
# for paths
in_hicolor_src = lambda x: join(theme_dir, x)
in_hicolor = lambda x: join(hicolor_path, x)
# to install things
encode = lambda src, dest: (dest, [src])
add_data_file = lambda src, dest: data_files.append(encode(src, dest))
# to install icons
def encode_icon(icon):
icon_path = str(Path(icon).parents[0])
return encode(in_hicolor_src(icon), in_hicolor(icon_path))
add_icon = lambda icon: data_files.append(encode_icon(icon))
# These files will be installed into prefix
data_files = []
# Icons and desktop file
add_data_file('data/ml.prevete.Daty.desktop', 'share/applications')
icons = ['scalable/apps/ml.prevete.Daty.svg',
'scalable/apps/ml.prevete.Daty-symbolic.svg',
'scalable/places/discussion-page-symbolic.svg',
'48x48/apps/ml.prevete.Daty.png',
'16x16/apps/ml.prevete.Daty-symbolic.png'
]
for icon in icons:
add_icon(icon)
# data_files = data_files + [encode_icon(icon) for icon in icons]
#
# data_files = [
# ('share/applications', ['daty/resources/ml.prevete.Daty.desktop']),
# (hicolor_path('scalable/apps'), [hicolor_src_path('scalable/apps/ml.prevete.Daty.svg')]),
# (hicolor_path('scalable/apps'), [hicolor_src_path('scalable/apps/ml.prevete.Daty-symbolic.svg')]),
# (hicolor_path('scalable/places'), [hicolor_src_path('scalable/places/discussion-page-symbolic.svg')]),
# (hicolor_path('48x48/apps'), [hicolor_src_path('48x48/apps/ml.prevete.Daty.png')]),
# (hicolor_path('16x16/apps'), [hicolor_src_path('16x16/apps/ml.prevete.Daty-symbolic.png')])
# ]
data_files.extend(help())
......@@ -72,12 +111,7 @@ setup(
'': ['*.sh'],
'daty':daty_files
},
data_files = data_files, #[
# ('share/applications', ['daty/resources/ml.prevete.Daty.desktop']),
# ('share/icons/hicolor/scalable/apps', ['daty/resources/icons/scalable/apps/ml.prevete.Daty.svg']),
# ('share/icons/hicolor/48x48/apps', ['daty/resources/icons/48x48/apps/ml.prevete.Daty.png']),
# ('share/icons/hicolor/16x16/apps', ['daty/resources/icons/16x16/apps/ml.prevete.Daty-symbolic.png'])
#],
data_files = data_files,
entry_points = {'gui_scripts': ['daty = daty:main']},
install_requires = [
'appdirs',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment