2014-07-06 20:35:24 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
|
|
|
|
### BEGIN LICENSE
|
|
|
|
# Copyright (C) 2012, Wolf Vollprecht <w.vollprecht@gmail.com>
|
|
|
|
# This program is free software: you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 3, as published
|
|
|
|
# by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranties of
|
|
|
|
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
|
|
|
|
# PURPOSE. See the GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along
|
|
|
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
### END LICENSE
|
|
|
|
|
|
|
|
|
|
|
|
##################################################################################
|
|
|
|
###################### YOU SHOULD MODIFY ONLY WHAT IS BELOW ######################
|
|
|
|
##################################################################################
|
2018-04-10 23:22:03 +00:00
|
|
|
from setuptools import setup
|
2018-04-04 18:31:54 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
def package_files(directory):
|
|
|
|
paths = []
|
|
|
|
for (path, directories, filenames) in os.walk(directory):
|
|
|
|
for filename in filenames:
|
|
|
|
paths.append(os.path.join(path, filename))
|
|
|
|
return paths
|
2014-07-06 20:35:24 +00:00
|
|
|
|
2018-04-04 18:31:54 +00:00
|
|
|
extra_files_ui = package_files('./data/ui')
|
|
|
|
extra_files_media = package_files('./data/media')
|
2018-04-15 12:26:38 +00:00
|
|
|
extra_files_scripts = package_files('./data/lua')
|
2018-04-04 18:31:54 +00:00
|
|
|
from pprint import pprint
|
|
|
|
pprint(extra_files_ui)
|
|
|
|
pprint(extra_files_media)
|
|
|
|
|
2018-05-13 14:50:10 +00:00
|
|
|
if os.path.isfile("/.flatpak-info"):
|
2018-04-11 13:31:43 +00:00
|
|
|
app_prefix = '/app/'
|
2018-05-13 15:03:48 +00:00
|
|
|
print("in flatpak")
|
2018-04-11 13:31:43 +00:00
|
|
|
else:
|
|
|
|
app_prefix = ''
|
|
|
|
|
2018-04-04 18:31:54 +00:00
|
|
|
setup(
|
2014-07-06 20:35:24 +00:00
|
|
|
name='uberwriter',
|
2018-04-20 20:18:56 +00:00
|
|
|
version='2.0 beta',
|
2014-07-06 20:35:24 +00:00
|
|
|
license='GPL-3',
|
|
|
|
author='Wolf Vollprecht',
|
|
|
|
author_email='w.vollprecht@gmail.com',
|
|
|
|
description='A beautiful, simple and distraction free markdown editor.',
|
2018-04-04 18:31:54 +00:00
|
|
|
long_description="""UberWriter, beautiful distraction free writing
|
|
|
|
With UberWriter you get only one thing: An empty textbox, that is to
|
|
|
|
fill with your ideas. There are no settings, you don't have to choose a
|
|
|
|
font, it is only for writing.You can use markdown for all your markup
|
|
|
|
needs. PDF, RTF and HTML are generated with pandoc. For PDF generation it
|
|
|
|
is also required that you choose to install the texlive-luatex package.""",
|
2018-04-10 23:22:03 +00:00
|
|
|
url='https://github.com/wolfv/uberwriter/',
|
2018-04-04 18:31:54 +00:00
|
|
|
# cmdclass={'install': InstallAndUpdateDataDirectory},
|
2014-07-06 20:35:24 +00:00
|
|
|
package_dir = {
|
2018-04-04 18:31:54 +00:00
|
|
|
# "": '/opt/uberwriter/'
|
2014-07-06 20:35:24 +00:00
|
|
|
},
|
|
|
|
packages=[
|
|
|
|
"uberwriter_lib.gtkspellcheck",
|
|
|
|
"uberwriter_lib.pylocales",
|
2018-04-04 18:31:54 +00:00
|
|
|
# "uberwriter_lib.pressagio",
|
2014-07-06 20:35:24 +00:00
|
|
|
"uberwriter_lib",
|
2018-04-10 23:22:03 +00:00
|
|
|
"uberwriter",
|
|
|
|
"po"
|
2018-04-04 18:31:54 +00:00
|
|
|
# "uberwriter.plugins"
|
|
|
|
# "uberwriter.plugins.bibtex"
|
2014-07-06 20:35:24 +00:00
|
|
|
],
|
2018-04-10 23:22:03 +00:00
|
|
|
include_package_data=True,
|
|
|
|
|
2014-07-06 20:35:24 +00:00
|
|
|
package_data={
|
2018-04-04 18:31:54 +00:00
|
|
|
'uberwriter_lib.pylocales' : ['locales.db'],
|
2014-09-11 23:59:05 +00:00
|
|
|
},
|
2014-10-02 17:02:59 +00:00
|
|
|
data_files=[
|
2018-04-11 13:31:43 +00:00
|
|
|
(app_prefix + '/bin/', ['bin/uberwriter']),
|
2018-04-13 18:19:30 +00:00
|
|
|
(app_prefix + '/share/glib-2.0/schemas', ['data/de.wolfvollprecht.UberWriter.gschema.xml']),
|
2018-04-11 13:31:43 +00:00
|
|
|
(app_prefix + '/share/icons/hicolor/scalable/apps', ['data/media/uberwriter.svg']),
|
|
|
|
(app_prefix + '/share/applications', ['de.wolfvollprecht.UberWriter.desktop']),
|
|
|
|
(app_prefix + '/opt/uberwriter/data/ui', extra_files_ui),
|
2018-04-15 12:26:38 +00:00
|
|
|
(app_prefix + '/opt/uberwriter/data/media', extra_files_media),
|
|
|
|
(app_prefix + '/opt/uberwriter/data/lua', extra_files_scripts)
|
2014-10-04 22:18:17 +00:00
|
|
|
]
|
2014-10-02 17:15:25 +00:00
|
|
|
)
|