[Skencil-devel] Revitalising Skencil

Igor Novikov igor.e.novikov at gmail.com
Wed Sep 29 01:05:06 CEST 2010


On Mon, Sep 27, 2010 at 1:36 PM, Bernhard Herzog <bh at intevation.de> wrote:

> On 22.09.2010, Igor Novikov wrote:
> > On Wed, Sep 22, 2010 at 4:17 PM, Bernhard Herzog <bh at intevation.de>
> wrote:
> > > Igor Novikov <igor.e.novikov at gmail.com> writes:
> > >  > 4. Root "skencil" package is introduced
> > >
> > > What will that mean for Skencil users?  Will their startup-scripts and
> > > third-party scripts and plugins still work?
> >
> > Internal application structure is not changed. So all scripts and plugins
> > will be workable.
>
> The way it has been implemented will likely lead to subtle bugs or strange
> exceptions later on.  You can now import the Skencil modules using two
> different absolute module names.  E.g. skencil.Sketch.UI.mainwindow and
> Sketch.UI.mainwindow will now be different modules imported from the same
> python file.  If both names are used in the same problem it's likely to
> cause
> problems.
>

Distutils build supposes that installed python application/library contains
one or several
python packages. Skencil structure has following folders:

Lib
Plugins
Resources
Script
Sketch

I think it's not a good idea to introduce such python packages due to
possible clashes.
Therefore internal Skencil structure was wrapped as a single package with
unique 'skencil' name.
Of course all these folders could be moved inside Sketch package but this
will lead to serious
project refactoring. Also when you import Sketch package __init__.py runs a
lot of initializing code
including some tricks like creating runtime packages. Such behavior breaks a
work of some
python applications. Concerning sK1 we have received notification from
package maintainers and
therefore we have fixed this issue a long time ago.

Anyway I agree that current Skencil architecture is not perfect. But I don't
like refactoring
current branch. I think we have a chance changing this when we will port
application on
Gtk widgetset because all UI related code should be reimplemented.

We have start sK1 1.0 branch for Gtk porting and I hope we will remove all
the hacks and tricks
in the process of porting on Gtk widgetset.

But actually a real reason of porting is not a project structure. We have
found a lot of tk related
problem under Ubuntu. For example, LANG environment variable issue. In
Ubuntu the variable
is changed from xxx.UTF8 to xxx.utf8. But tk doesn't support such trick and
as a result you
can type English letters only in all tk input fields including application
canvas. This issue is not important
for Skencil because it doesn't support Unicode encoding. But for sK1 this
issue is a blocker.



>
> And why is it called "src" in the source tree and not "skencil"?


"src" folder is a widely used pattern for project structure. A quick glance
to see where is an application source code.
But there is no sense creating "skencil" folder inside src/ because src/
folder will be empty.


-- 
Regards,

Igor Novikov
sK1 Project
http://sk1project.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wald.intevation.org/pipermail/skencil-devel/attachments/20100929/6e586810/attachment.htm


More information about the Skencil-devel mailing list