spyder directory layout question

46 views
Skip to first unread message

Steve

unread,
Jan 18, 2012, 5:06:04 PM1/18/12
to spyder
Why does spyder have three separate folders that all exist parallel
under site-packages? Wouldn't it be cleaner and make more sense to
put those folders all under a single spyder(lib) folder? This would
also allow developers to put the repo directly in this one directory.

anatoly techtonik

unread,
Jan 19, 2012, 5:32:58 PM1/19/12
to spyd...@googlegroups.com
I am not aware how Spyder installs itself into site-packages. Can you provide more details?

anatoly techtonik

unread,
Jan 19, 2012, 5:34:07 PM1/19/12
to spyd...@googlegroups.com
FYI, it is easier for development to just run Spyder from source - without placing it into site-packages.

Steve

unread,
Jan 19, 2012, 6:18:38 PM1/19/12
to spyder
After install you will see it creates three separate folders:
C:\Python27\Lib\site-packages\spyder
C:\Python27\Lib\site-packages\spyderlib
C:\Python27\Lib\site-packages\spyderplugins

This structure pretty much forces development to be done away from the
normal spyder paths.

It just seems like it would be cleaner if it were all located under
C:\Python27\Lib\site-packages\spyder

Putting all the files in the one directory could have the side effect
of letting development be done in the folder under site-packages
instead of somewhere else.

I do know that you can bootstrap spyder from the development
directory. I don't, however, know how to specify an ini. It doesn't
seem to use the default %USERPROFILE%/.spyder2/.spyder.ini file. Is
that by design or coincidence? I dropped a spyder.ini into my devel
directory but spyder seemed to ignore it.

Steve

unread,
Jan 19, 2012, 6:21:13 PM1/19/12
to spyder
I should add that I'm not implying that spyderlib and spyderplugins
should be merged into the single top level folder.

Pierre Raybaut

unread,
Jan 20, 2012, 5:04:30 PM1/20/12
to spyd...@googlegroups.com
Le 20 janv. 2012 à 00:18, Steve <steve.f....@gmail.com> a écrit :

> After install you will see it creates three separate folders:
> C:\Python27\Lib\site-packages\spyder
> C:\Python27\Lib\site-packages\spyderlib
> C:\Python27\Lib\site-packages\spyderplugins

Only the two last ones are really installed by Spyder itself. The
first one is created by the Spyder's Python(x,y) Windows installer and
has absolutely no direct effect on the Python installation (files
related to the Python(x,y) installer are stored there: uninstaller
program, installation log, ...).

> This structure pretty much forces development to be done away from the
> normal spyder paths.
>
> It just seems like it would be cleaner if it were all located under
> C:\Python27\Lib\site-packages\spyder

The current situation is clean -- it is very common (and totally
admitted and handled by official deployment tools like distutils) for
Python libraries to have more than one package inside them (meaning
more than one folder installed in site-packages). Two seems quite
reasonable.

> Putting all the files in the one directory could have the side effect
> of letting development be done in the folder under site-packages
> instead of somewhere else.

Well, developing directly in the site-packages directory is clearly
not a good practice. This directory is only intended as a target
folder for installing libraries, not for developing code. For this,
you would have to create a development folder elsewhere (on Windows,
preferably outside C:\Python27) and add it to your PYTHONPATH user
environment variable. Or, as suggested Anatoly, you may directly run
Spyder's development version through the bootstrap script without
having to change your environment variables.

> I do know that you can bootstrap spyder from the development
> directory. I don't, however, know how to specify an ini. It doesn't
> seem to use the default %USERPROFILE%/.spyder2/.spyder.ini file. Is
> that by design or coincidence? I dropped a spyder.ini into my devel
> directory but spyder seemed to ignore it.

AFAIK, Spyder is using the ini located in user's home directory.

If this is an issue with the ini file being the same with the stable
release and the development release, then this is another problem.
Note that it would be a good idea to create a preference directory
specific to the development version.

In the meantime, you may copy the whole directory and restore it later
if you want to backup your whole configuration. Note that there is
also the "session" open/save feature which should do exactly the same
thing.

>
> On Jan 19, 4:34 pm, anatoly techtonik <techto...@gmail.com> wrote:
>> FYI, it is easier for development to just run Spyder from source - without
>> placing it into site-packages.
>

> --
> You received this message because you are subscribed to the Google Groups "spyder" group.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
>

Steve

unread,
Jan 20, 2012, 6:11:24 PM1/20/12
to spyder
So a bootstrapped devel version of spyder is supposed to use the
default ini (same as installed version)?

On Jan 20, 4:04 pm, Pierre Raybaut <pierre.rayb...@gmail.com> wrote:

Carlos Córdoba

unread,
Jan 20, 2012, 11:03:39 PM1/20/12
to spyd...@googlegroups.com
It's not supposed to, it's just the current behavior which, as Pierre
suggested, can be changed, and I would like to give my +1 for it. I
think it's a good idea.

El 20/01/12 18:11, Steve escribió:

Pierre Raybaut

unread,
Jan 21, 2012, 3:23:34 AM1/21/12
to spyd...@googlegroups.com
Yes, the ini location should not be dependent on the fact that Spyder
is installed or not.
Reply all
Reply to author
Forward
0 new messages