[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-recutils] Python support

From: Maninya M
Subject: Re: [bug-recutils] Python support
Date: Mon, 22 Jul 2013 11:01:27 +0530

Please check the Python branch of git gnu savannah recutils project.

1) I have written the functions for database, rset and record, sexes and fexes (not complete).

2) I am not exactly sure which will be needed in Python. So could you please clarify about these:

On 10 July 2013 21:48, Maninya M <address@hidden> wrote:

    1) Please check the stubs file which contains some functions that
    would be used in Python. I have begun writing functions to parse files
    first. The function RecDb_loadfile() loads a rec file into the
    database. Please let me know to what level the C functions need to be
    exposed in Python.

- The recutils.c file will compile into a pythong module, isnt it?  That
  is a shared object.  Is that correct?

   - Yes. The shared object is created in the the dist-packages directory
      of the python installation.  
- Please follow the GNU coding standards for C code contributed for
  recutils.  This including formatting rules, naming, indentation, etc.
  See www.gnu.org/prep/standards for details.

- I would prefer to use lower case letters and underscores for C
  identifiers, even if the convention in Python/C seems to be different.
  Mixed case is not a good idea in case-sensitive languages.
    - Ok, I am making necessary changes. 

    2) Please let me know if this approach is alright.

Look correct to me.

   - Ok, I will upload the rest of the functions too.
    3) Shall I use pip for installation? Setup.py seems a bit messy, and
    we can't uninstall easily.

Care to elaborate?  What is pip and how does it differentiates to having
a setup.py file?
    - pip is a tool used for installing Python packages. While installing using 
      "python setup.py install" I found that uninstalling was not readily supported, plus 
       installing different versions was not possible. This was making testing/comparing
       a bit tiresome. When I tried to find a work around, I read that pip could do all these things. 
       So I asked the question because I thought I had to use a different script than setup.py. But 
       I have used it and found that we use the same setup.py file, we just install using a pip 
       command. So there will not be any change in the setup file to use pip. Also using 
       virtualenv (which installs pip automatically), which creates isolated Python environments 
       makes it much easier to run different installations. :) So this question was more about 
       what tool I can use...it's the same for the end user.

Also, I would much prefer you to work in a branch in the official
recutils repo.  In this way we can integrate the plugin in the recutils
source tree right from the beginning, substituting the preliminary work
I did in the recutils/python subdirectory.

You will need to create a savannah account first, and then request
membership to the 'recutils' project.  Tell me when that is done so I
can add you to the project and create the branch.

   - Thanks, yes will do. 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]