2621: use python-setuptools (draft)
svn: r19031
This commit is contained in:
parent
b7373e10b3
commit
48399325fc
23
MANIFEST.in
Normal file
23
MANIFEST.in
Normal file
@ -0,0 +1,23 @@
|
||||
include COPYING
|
||||
include FAQ
|
||||
include gramps.sh.in
|
||||
include INSTALL
|
||||
include NEWS
|
||||
include README
|
||||
include TODO
|
||||
include MANIFEST.in
|
||||
include setup.cfg
|
||||
include babel.cfg
|
||||
include setup.py
|
||||
recursive-include data *
|
||||
#recursive-include debian *
|
||||
#recursive-include docs *
|
||||
recursive-include example *
|
||||
recursive-include help *
|
||||
#recursive-include m4 *
|
||||
#recursive-include mac *
|
||||
recursive-include po *
|
||||
recursive-include src *
|
||||
#recursive-include test *
|
||||
#recursive-include windows *
|
||||
global-exclude Makefile.am
|
22
babel.cfg
Normal file
22
babel.cfg
Normal file
@ -0,0 +1,22 @@
|
||||
[python: src/**.py]
|
||||
encoding = utf-8
|
||||
|
||||
[glade: src/**.glade]
|
||||
encoding = utf-8
|
||||
extractor = babelglade.extractor
|
||||
|
||||
[xml: data/**.desktop]
|
||||
encoding = utf-8
|
||||
|
||||
[xml: data/**.keys]
|
||||
encoding = utf-8
|
||||
|
||||
[xml: data/**.xml]
|
||||
encoding = utf-8
|
||||
|
||||
[xml: src/**.xml]
|
||||
encoding = utf-8
|
||||
|
||||
|
||||
|
||||
|
43
setup.cfg
Normal file
43
setup.cfg
Normal file
@ -0,0 +1,43 @@
|
||||
[install]
|
||||
#prefix=/usr
|
||||
#install_lib= /usr/lib/python2.6/dist-packages
|
||||
#install_data= $prefix
|
||||
#install_scripts=/usr/bin
|
||||
record = log
|
||||
|
||||
[dist]
|
||||
long-description = Gramps is an application...
|
||||
|
||||
[sdist]
|
||||
formats = gztar zip
|
||||
|
||||
[bdist_rpm]
|
||||
group = Applications
|
||||
python = python2.6
|
||||
packager =
|
||||
doc_files = README INSTALL COPYING NEWS FAQ TODO
|
||||
|
||||
[bdist_msi]
|
||||
#bdist-dir =
|
||||
#dist-dir =
|
||||
#install-script =
|
||||
|
||||
[extract_messages]
|
||||
keywords = _, N_, gettext, ngettext, sgettext
|
||||
mapping_file = babel.cfg
|
||||
width = 80
|
||||
output_file = po/messages.pot
|
||||
|
||||
[update_catalog]
|
||||
output_dir = po
|
||||
input_file = po/messages.pot
|
||||
|
||||
[compile_catalog]
|
||||
domain = gramps
|
||||
directory = po
|
||||
#output_file = $prefix/share/locale/lang/LC_MESSAGES/gramps.mo
|
||||
|
||||
[init_catalog]
|
||||
domain = gramps
|
||||
input_file = po/messages.pot
|
||||
#output_dir = po
|
17
setup.py
17
setup.py
@ -20,6 +20,7 @@ from distutils.cmd import Command
|
||||
from distutils.core import setup
|
||||
from distutils.command.build import build
|
||||
from distutils.command.install_data import install_data
|
||||
from babel.messages import frontend as babel
|
||||
import sys
|
||||
import glob
|
||||
import os.path
|
||||
@ -201,6 +202,7 @@ def os_files ():
|
||||
('share/icons/gnome/scalable/mimetypes', ['data/gnome-mime-application-x-gramps-package.svg']),
|
||||
('share/icons/gnome/scalable/mimetypes', ['data/gnome-mime-application-x-gramps-xml.svg']),
|
||||
# man-page, /!\ should be gramps.1 with variables
|
||||
# migration to sphinx/docutils/gettext environment ?
|
||||
(os.path.join(man_dir, 'man1'), ['data/man/gramps.1.in']),
|
||||
(os.path.join(man_dir, 'nl', 'man1'), ['data/man/nl/gramps.1.in']),
|
||||
(os.path.join(man_dir, 'sv', 'man1'), ['data/man/sv/gramps.1.in']),
|
||||
@ -221,6 +223,7 @@ def os_files ():
|
||||
]
|
||||
return files
|
||||
|
||||
# compile_catalog class ?
|
||||
def make_po ():
|
||||
for po in glob.glob(os.path.join(PO_DIR, '*.po')):
|
||||
lang = os.path.basename(po[:-3])
|
||||
@ -350,6 +353,11 @@ if platform.system() == 'FreeBSD':
|
||||
man_dir = 'man'
|
||||
else:
|
||||
man_dir = os.path.join('share', 'man')
|
||||
|
||||
# TODO
|
||||
# implement environment/variables for
|
||||
# extract_messages, init_catalog, update_catalog classes
|
||||
# message_extractors = po/POTFILES.in
|
||||
|
||||
result = setup(
|
||||
name = name,
|
||||
@ -375,5 +383,12 @@ result = setup(
|
||||
platforms = ['Linux', 'FreeBSD', 'MacOS', 'Windows'],
|
||||
scripts = script,
|
||||
requires = ['pygtk', 'pycairo', 'pygobject'],
|
||||
cmdclass={'build': BuildData, 'install_data': InstallData, 'uninstall': Uninstall},
|
||||
cmdclass={
|
||||
'build': BuildData,
|
||||
'install_data': InstallData,
|
||||
'uninstall': Uninstall,
|
||||
'compile_catalog': babel.compile_catalog,
|
||||
'extract_messages': babel.extract_messages,
|
||||
'init_catalog': babel.init_catalog,
|
||||
'update_catalog': babel.update_catalog},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user