← Back to team overview

kicad-developers team mailing list archive

Re: Mac OSX build, with scripting, codename "wife"

 

On 03/11/2013 09:23 AM, Adam Wolf wrote:
> Hi Dick,
>
> The modules just have to be in a place on the PYTHONPATH (afaik). 
> We can either put them in a location that is already on the
> PYTHONPATH, or put them in a location that isn't on the PYTHONPATH
> and provide instructions on how to modify your PYTHONPATH or modify
> it for the user.
>
> I have seen more projects where they put the default modules in
> dist/site-packages, than ones where they do not--however, the
> audience for kicad doesn't necessarily match the audience for these
> other projects.  I believe the standard response for "I want to
> modify these files that are part of the package" is to copy them
> into another directory, like your ~/.kicad directory, put it higher
> on your PYTHONPATH than site-/dist-packages, and then modify away.
>
> For things that are purely python modules, and don't tie into apps,
> the status quo is putting it in Pypi and letting users install it
> however they want--these days, probably virtualenv and pip.  From a
> python point of view, this might be the right answer, but I believe
> there was pushback on this when Miguel suggested something similar.
>
> I think it's also important we make the distinction between python
> pieces.  We have some SWIGgy stuff, as well as human-readable and
> -modifiable things like the footprint wizard.
>
> If you want them to start out in a user-writable directory,


For the 4th time, yes.  And it would not bother me at all to be
different from a decade of other python users, but like blender users.

I am happy to be different, when I know I am helping myself.

Maintaining a distinction between two categories of kicad python
modules is a low priority to me.

For linux users, the installer can set PYTHONPATH on the commandline,
and this can be done in a desktop launcher (icon or menu):


$ PYTHONPATH=<writeable-convenient-dir>:$PATHONPATH  pcbnew

$ PYTHONPATH=<writeable-convenient-dir>:$PATHONPATH  kicad


I believe these settings would last as long as the program is running,
only.  Which is about what we want.

Might need to to put sh in front of that.






> what's the next step?
>
> Adam Wolf
> Wayne and Layne, LLC
>
>
> On Mon, Mar 11, 2013 at 9:06 AM, Dick Hollenbeck <dick@xxxxxxxxxxx
> <mailto:dick@xxxxxxxxxxx>> wrote:
>
>     On 03/11/2013 08:25 AM, Adam Wolf wrote:
>     > Miguel,
>     >
>     > I only know about Blender/Python on Windows.
>     >
>     > I think site-packages (dist-packages on Debian/Ubuntu) might
>     be the
>     > right way to do it.  Put the python modules in a place that's
>     > already on the PYTHONPATH that package managers already expect
>     folks
>     > to put modules into.  The idea of having an environment
>     variable to
>     > tell CMake another place to put it is great, but I think
>     > site-packages is a sane default.
>
>     I know of no python programmers named root.
>
>     No thanks.  My name is also not root.
>
>     So on my system, this would be considered extremely
>     inconvenient.  I'd
>     like to actually be able to edit the scripts.  If the intention
>     is to
>     make them not editable, then we should write them in C++ and
>     compile them.
>
>
>
>



Follow ups

References