Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   #501774 - where should the library source go? (http://www.linux-archive.org/debian-development/198460-501774-where-should-library-source-go.html)

"Luke Kenneth Casson Leighton" 11-23-2008 07:29 PM

#501774 - where should the library source go?
 
folks, hi,
with respect to RFP #501744 pyjamas package, i thought it best to
explain the code's layout and also ask some advice on where files
should be installed.

pyjamas is general-purpose compiler technology, not just a random
"dumb" tool with a single fixed - and unexpandable - purpose. the
libraries that come with the current versions of pyjamas are the
_first_ of their kind, but they certainly won't be the last.

the code is broken down as follows:

* pyjs/pyjs.py - the python-to-javascript compiler. takes input file
name or stdin, outputs to stdout or output file. module pathnames
_have_ to be given to it, to make sure that it DOES NOT read in any
python modules from STANDARD python2.4/2.5/2.6 locations. suitable for
general-purpose use.

* builder/build.py - a specialised builder which is targetted at
building web applications: it adds the default pyjamas-web "library"
path automatically; it adds a few pngs, gifs and outputs an html
template into a subdirectory. NOT suitable for general-purpose use.

* library/pyjslib.py - a dedicated library that provides
javascript-equivalents of python builtins "List, Dict, Tuple, str,
len" etc. etc. suitable for general-purpose use.

* library/ui.py, DOM.py, Window.py etc - the web-specific libraries
that provide the basis for pyjamas "widgets" running _specifically_ in
web browsers. like build.py, these library files are not appropriate
for general-purpose use.

so that's the background. the equivalence, if this was gcc, would be
as follows:

* pyjs.py would be /usr/bin/gcc

* build.py would be... ohh... perhaps something like... autoconf.

* pyjslib.py would be /usr/lib/gcc/x86_64-linux-gnu/4.3.2/libgcc.a

* DOM.py would be ... ooo... /usr/lib/libglib.so and /usr/include/glib/glib.h

* ui.py would be... /usr/lib/libgtk.so

my question, therefore, is: where in hell's name should these files
be installed????

* pyjs.py is obvious: it goes into /usr/bin/pyjs.py

* build.py is slighly less obvious: it should be called /usr/bin/pyjswebbuild.py

* pyjslib.py i have absolutely NO clue about.
/usr/share/pyjamas/library/pyjslib.py ?
/usr/lib/pyjs/library/pyjslib.py ?

* DOM.py and ui.py etc. i have NO clue.
/usr/share/pyjamas/library/pyjamas/DOM.py ui.py Window.py etc. ?
/usr/lib/pyjs/pyjamas/DOM.py ?

these files MUST be kept the hell away from "standard" python: pyjamas
is a COMPLETELY different toolchain, it's a completely separate
compiler, that _happens_ to take its input as python and _happens_ to
output javascript. pyjamas must neither be allowed to get
non-explicitly-given access to standard python (/usr/lib/python*,
/usr/share/python-support/*) not must standard python be given access
to pyjamas libraries.

that being the case, someone needs to "invent" a standard location
where all libraries contained as part of the pyjamas "package", and
all FUTURE libraries which depend, in future, on the pyjamas compiler,
are to be installed.

can anyone come up with any good ideas?

ta,

l.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Thomas Viehmann 11-23-2008 09:03 PM

#501774 - where should the library source go?
 
Hi Luke,

Luke Kenneth Casson Leighton wrote:
> with respect to RFP #501744 pyjamas package, i thought it best to
> explain the code's layout and also ask some advice on where files
> should be installed.
I should think that most of it should be somewhere under
/usr/share/pyjamas, the builder probably not, but it needs a better name
pyjamas-build or so to go into /usr/bin.

> * pyjs.py would be /usr/bin/gcc

> * build.py would be... ohh... perhaps something like... autoconf.
Not more like make? I never called pyjs directly.

> my question, therefore, is: where in hell's name should these files
> be installed????

> * pyjs.py is obvious: it goes into /usr/bin/pyjs.py
I wouldn't unless one needs to call it directly. Also, lose the .py for
stuff in /usr/bin

> * build.py is slighly less obvious: it should be called /usr/bin/pyjswebbuild.py
Similar.

> * pyjslib.py i have absolutely NO clue about.
> /usr/share/pyjamas/library/pyjslib.py ?
> /usr/lib/pyjs/library/pyjslib.py ?
> * DOM.py and ui.py etc. i have NO clue.
> /usr/share/pyjamas/library/pyjamas/DOM.py ui.py Window.py etc. ?
> /usr/lib/pyjs/pyjamas/DOM.py ?
These (both "*"s) should all go somewhere under /usr/share/pyjamas.
share vs. lib is whether the files are *arch*-dependent, which they are not.

> that being the case, someone needs to "invent" a standard location
> where all libraries contained as part of the pyjamas "package", and
> all FUTURE libraries which depend, in future, on the pyjamas compiler,
> are to be installed.

Well, the question I'd have is whether pyjamas really is stable enough
to go into unstable.

> can anyone come up with any good ideas?

For the most part, you seem to have figured it all out already.

Kind regards

T.


--
Thomas Viehmann, http://thomas.viehmann.net/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 08:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.