Comments (13)
Comment by Thomas Spura
6 Sep 2009 at 9:15 GMT
Forgot to add:
docstrings are missing to make it a 'perfect' package ;)
from shedskin.
Comment by Mark Dufour
7 Sep 2009 at 6:36 GMT
thanks! ;) I committed the patch, with a few small changes, and renamed ss.py to
__init__.py. please let me know if anything I changed seems wrong to you..
I moved bert.py to testdata/, since it's only used in the tests, and removed
backward.py, because it was only needed when using Python 2.3, which is not
supported
anymore. thanks for noting!
I really don't like to add .py to the 'shedskin' startup script, but I guess you
added this because it otherwise conflicts with the new 'shedskin' dir.. I'm now
thinking about writing a distutils setup.py, or would you be interested in
adding that?
from shedskin.
Comment by Mark Dufour
7 Sep 2009 at 6:47 GMT
hm.. no time to investigate further, but the following now results in an error:
srepmub@akemi:~/shedskin/examples$ shedskin go
*** SHED SKIN Python-to-C++ Compiler 0.2 ***
Copyright 2005-2009 Mark Dufour; License GNU GPL version 3 (See LICENSE)
*ERROR* go.py:None: cannot locate module: builtin
(shedskin is a symlink in /usr/bin to shedskin.py)
from shedskin.
Comment by Thomas Spura
7 Sep 2009 at 11:33 GMT
Yeha, the patch from remove SHEDSKIN ROOT is wrong... :(
Here is another now correctly one ;)
Your changes are ok. I don't have yet much experience in creating packages. If
you
believe this is the best method (moving ss.py into __init__.py...), it's ok ;)
Does extmod.py belongs in the shedskin package too? It should, but I'm not
sure^^
Attachments:
from shedskin.
Comment by Thomas Spura
8 Sep 2009 at 6:05 GMT
Wouldn't it better to have just usage() and main() in __init__.py?
This patch moves generate_code to cpp.py (as suggested in TODO). What about
analysis
and annotate?
I'd prefer to get it out of __init__ ;)
About annotation:
This is more useful for us, than for 'just' users of ss.
Second patch makes annotaion = False as std and shedskin -a or shedskin -ann
enables
annotaion.
Ah, forgot to add in "now_properly_remove_SHEDSKIN_ROOT.patch":
in unit.py instead import ss[…] import shedskin[…]
Attachments:
from shedskin.
Comment by Mark Dufour
9 Sep 2009 at 12:08 GMT
thanks! I committed the new SHEDSKIN ROOT patch, but avoiding the 'shedskin'
import
and magic constant of 22. let's find out what happens with this under windows
later..
and you are right, I forgot to move extmod.py as well.
will look at the other patches later today.
from shedskin.
Comment by Mark Dufour
9 Sep 2009 at 12:58 GMT
how about so? :)
you are right this is much better!
about annotation: I think this can also be useful for regular users, as it can
sometimes make it easier for them to understand some strange piece of code. but
I
agree this is not typical usage, so the default should be 'off'.
thanks for all the help!
from shedskin.
Comment by Thomas Spura
9 Sep 2009 at 1:32 GMT
You are welcome ;)
Hmm, how to install this later on? Where is lib with all .cpp and .hpp living?
With shedskin module installed in site-packages lib has to be there, too (with
current configuration).
So make it complicated and install them as header files in /usr/include or make
it
simple and also move lib into the shedskin package. But what happens then
inside of
the package? Means, then it's possible to call a "import shedskin.lib" or
something
from outside?
I'm a bit confused atm :-D
from shedskin.
Comment by Mark Dufour
9 Sep 2009 at 3:37 GMT
I'm guessing distutils does this kind of thing in a standardized way.. maybe
you'd
like to have a look at creating a distutils setup.py?
from shedskin.
Comment by Thomas Spura
9 Sep 2009 at 3:56 GMT
Could be, but how to determin the libdir from shared itself? If distutils
installs it
where it wants to, we need to search at least at 2 places for the dir…
from shedskin.
Comment by Mark Dufour
9 Sep 2009 at 4:00 GMT
my guess is you can just ask distutils this?
from shedskin.
Comment by [email protected]
24 Sep 2009 at 11:45 GMT
If you wanted an easy distutils way of locating the bundled files, you could
put the
lib directory inside the package and then specify it in the package_data
parameter of
the distutils setup function in the setup.py script. Then, after installation,
the
lib directory would reside inside shedskin in site-packages and you could
generate
the necessary -I flags dynamically (for the Makefile) by asking for the lib
subdirectory of shedskin.__file__.
I'm not sure how compatible this is with Debian guidelines, for example, but I
do
similar things with some of my own packages. Generally, distutils is quite
deficient
in dealing with the wider filesystem, but this is the least worst solution.
from shedskin.
Comment by Mark Dufour
18 Mar 2010 at 7:57 GMT
- Changed state: Fixed
from shedskin.
Related Issues (20)
- itertools updates since 3.1 or so HOT 1
- replace asprintf usage HOT 1
- formatting edge cases
- make range a sequence type, fill in missing attrs/methods HOT 2
- io.StringIO HOT 1
- windows: c64/hq2x examples: error c1061 HOT 1
- windows: pylot example exception
- ignore typing imports/usage? HOT 1
- look into method pointers again
- revert custom dict/set implementation
- slowness introduced in c56a690588c419afc59de7c353d41ce77e72d47f HOT 1
- Issue on Windows calling shedskin Python script from Ninja HOT 3
- add MinGW to CI
- if-elif output indentation HOT 2
- cleanup/expand ast_utils.py HOT 5
- Idea for reducing dependencies for shedskin HOT 5
- strip shedskin executables by default HOT 1
- --traceback on by default
- 0.9.9 release
- --nogcwarns by default HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shedskin.