Good work.
In the end, moving to setup.py would be done so that gramps is installed in
default_location_python_lib/gramps/...
and other programs can do
from gramps.gen import ....
So that means we must change the current src directory into the name
gramps. If you want to do that in trunk, that would be great :-)
Many text changes to achieve that.
Then setup.py only installs this gramps directory to the library, and we
need extra code to create a gramps binary file /usr/bin, and a script to
extract the strings for internationalization. So the work you do here.
Note that for python 3 import rules become much stricter than in 2.2, so we
will need to fix some import statements for that too.
As to the python 3/gobject port, more people are hitting the bug in the
pygobject code, and there have been attempts to fix it, but pygobject
developers did not succeed yet. If that is not fixed, we are stuck on pygtk
and python 2.7.
Benny
2012/3/12 jerome <romjerome@...>
> There is 2/3 issues on references with the 'extract_messages' command.
> Minor issue when we update the template for translations.
>
> 'plugins/lib/holidays.xml.in' is missing:
>
> os.system('''intltool-extract --type=gettext/xml src/plugins/lib/
> holidays.xml.in''')
>
> os.system('''xgettext -j --keyword=N_ --from-code=UTF-8'''
> ''' -o "po/gramps.pot" '''
> '''src/*/*.glade.h src/*/*/*.glade '''
> ''' */*.in.h */*/*.in.h */*/*/*.in.h''')
>
> and do not need to merge tips.xml with translations.
>
> http://www.gramps-project.org/bugs/view.php?id=5621#c23384
>
> I will make the change on next days.
>
>
> --
> Jérôme
>
>
> --- En date de : Lun 12.3.12, jerome <romjerome@...> a écrit :
>
> > De: jerome <romjerome@...>
> > Objet: [Gramps-devel] setup.py
> > À: gramps-devel@...
> > Date: Lundi 12 mars 2012, 18h39
> > Hi,
> >
> >
> > I suppose I have finished what I planned with the
> > experimental 'setup.py'.
> > I tested 'babel' classes[1], but it looks like that there is
> > nothing that we cannot make ourself. So, do not need an
> > other dependency.
> >
> > Unfortunately, I did not find a multiplatform tool for
> > extracting and merging some specific entries (.glade, .xml,
> > .keys, .desktop).
> > This means that extracting messages should be performed with
> > installed intltool[2]. Note, it is only for generating a new
> > template (gramps.pot) and building/installing Gramps does
> > not need it.
> >
> > I wanted to put this part out of 'setup.py', but I also
> > re-used some available lists (files to install). Otherwise,
> > we may also would like to have an up-to-date 'gramps.pot'
> > with code for people who do not use SVN.
> >
> > I also modified the common 'build, install' commands!
> > Why ? Because of rights issues (user/admin) and some
> > specific Gramps' things that distutils[3] does not use by
> > default! It was also simplier to test without some of these
> > classes... The uninstall class is also inherited from some
> > others 'setup.py'. And these __init__.py everywhere is not
> > very nice! Not certain that 'setuptools' is a good
> > choice...
> >
> > Anyway, once we know what should be done with some
> > non-python files (glade, css, images, etc ...) and if it
> > should generate multiple packages according to current
> > ecosystem (webbapp, gen, gui, etc ...), then it seems that
> > with minor changes we could have a working 'setup.py'.
> >
> > I tried to add comments where something has to be fixed or
> > where there is some possible specific behavior. I generated
> > some .rpm packages for Gramps under OpenSuse in the past and
> > I hope that everything is correct on this 'setup.py', but I
> > also know that I tried to use what is currently working
> > under my configuration and that cannot be used for
> > production.
> >
> > PS: during investigations, I saw some custom strings:
> > src/ExportAssistant.py:494:
> > src/gramps.py:115
> > src/Filters/SideBar/_PersonSidebarFilter.py:131
> > src/Filters/SideBar/_PersonSidebarFilter.py:133
> > src/cli/clidbman.py:78
> > src/gen/db/upgrade.py:81
> > src/gen/db/upgrade.py:82
> > src/gen/db/upgrade.py:83
> > src/gen/db/upgrade.py:84
> > src/gen/db/upgrade.py:85
> > src/gen/db/upgrade.py:86
> > src/gen/plug/utils.py:271
> > src/gui/makefilter.py:49
> > src/gui/plug/_guioptions.py:844
> > src/plugins/gramplet/EditExifMetadata.py:469
> > src/plugins/gramplet/Notes.py:100
> > src/plugins/lib/libgedcom.py:6414
> > src/plugins/mapservices/eniroswedenmap.py:139
> > src/plugins/mapservices/eniroswedenmap.py:140
> > src/plugins/textreport/DetDescendantReport.py:576
> > src/plugins/textreport/IndivComplete.py:208
> > src/plugins/textreport/PlaceReport.py:225
> > src/plugins/view/geofamily.py:299
> > src/plugins/view/geofamily.py:306
> > src/plugins/view/relview.py:1180
> > src/plugins/view/relview.py:1182
> > src/plugins/webreport/NarrativeWeb.py:1511
> > src/plugins/webreport/NarrativeWeb.py:6938
> > src/plugins/tool/mergecitations.glade:132
> >
> > I assume they are not conform!
> > We could also avoid to translate some strings used fr
> > debbuging/log or some DB things. I will try to remove some
> > translation marks on some of these files.
> >
> >
> > [1] http://babel.edgewall.org/wiki/Documentation/setup.html
> > [2] http://freedesktop.org/wiki/Software/intltool
> > [3] http://docs.python.org/library/distutils.html#module-distutils
> >
> >
> > regards,
> >
> > --
> > Jérôme
> >
> >
> ------------------------------------------------------------------------------
> > Try before you buy = See our experts in action!
> > The most comprehensive online learning library for Microsoft
> > developers
> > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5,
> > CSS3, MVC3,
> > Metro Style Apps, more. Free future releases when you
> > subscribe now!
> > http://p.sf.net/sfu/learndevnow-dev2
> > _______________________________________________
> > Gramps-devel mailing list
> > Gramps-devel@...
> > https://lists.sourceforge.net/lists/listinfo/gramps-devel
> >
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Gramps-devel mailing list
> Gramps-devel@...
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>
|