root package: gramps

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

root package: gramps

Terrel Shumway

If we plan to ever move to Python 2.7/3.x, creating a root package "gramps" and using absolute imports will simplify that transition.

  mkdir gramps
  touch gramps/__init__.py
  mv src/* gramps  
  mv gramps src


added note to http://gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at:  http://p.sf.net/sfu/wandisco-dev2dev

_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: root package: gramps

Benny Malengier

2011/8/22 Terrel Shumway <[hidden email]>

If we plan to ever move to Python 2.7/3.x, creating a root package "gramps" and using absolute imports will simplify that transition.

  mkdir gramps
  touch gramps/__init__.py
  mv src/* gramps  
  mv gramps src


added note to http://gramps-project.org/wiki/index.php?title=Gpygobject portingEPS_008:_File_Organization

So you mean instead of gramps/src, we have gramps/gramps.
I would like to move to setup.py too, and have gramps installed in the correct pythonic location, so that other applications could import gen in a standard way.
Note that on install, src/ in installed as /usr/share/gramps/, not src.

Benny


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2

_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: root package: gramps

jerome
In reply to this post by Terrel Shumway
Hi and welcome Terrel,


As said by Benny, we already looked at python-setuptools way[1].
There is an unfinished experimental setup.py, which should runs with current stable release (minor reorganisation on trunk ...).

The launcher according to OS is ignored (see some comments on setup.py).
I have generated some .rpm package before, so it was a quick resume of current automake installation.

There is an other sample with our make.py for the addon ecosystem, which is fully "python" and use common gnu gettext tools for translations !

About unit test[2], I used some of them (related to translation and makefile references). Else for testing Relationship calculation and Date handling, we set up to root path via pythonpath environment variable[3].

Others unit tests have been improved some years ago, but I never ran all of them (reports, database, etc ...).


[1] http://www.gramps-project.org/bugs/view.php?id=2621
[2] http://gramps-project.org/wiki/index.php?title=Unit_Test_Quickstart
[3] http://docs.python.org/using/cmdline.html#envvar-PYTHONPATH

Regards,
Jérôme

--- En date de : Mar 23.8.11, Benny Malengier <[hidden email]> a écrit :

De: Benny Malengier <[hidden email]>
Objet: Re: [Gramps-devel] root package: gramps
À: "Terrel Shumway" <[hidden email]>
Cc: [hidden email]
Date: Mardi 23 août 2011, 9h47


2011/8/22 Terrel Shumway <[hidden email]>


If we plan to ever move to Python 2.7/3.x, creating a root package
"gramps" and using absolute imports will simplify that transition.

  mkdir gramps
  touch gramps/__init__.py
  mv src/* gramps  
  mv gramps src


added note to http://gramps-project.org/wiki/index.php?title=Gpygobject portingEPS_008:_File_Organization


So you mean instead of gramps/src, we have gramps/gramps.
I would like to move to setup.py too, and have gramps installed in the correct pythonic location, so that other applications could import gen in a standard way.

Note that on install, src/ in installed as /usr/share/gramps/, not src.

Benny



-----La pièce jointe associée suit-----

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2

-----La pièce jointe associée suit-----

_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel