I'm trying to plan for one of my projects, and I'm considering using pyramid as a base. But while I was fiddling with it, I realized it wasn't really cross-platform. Is there any way to use pyramid/pylons without installing it? I would like to unpackage it and use it as an import, allowing me to move my project as a folder to many different computers with different OSes and performing normally.
> I'm trying to plan for one of my projects, and I'm considering using
> pyramid as a base. But while I was fiddling with it, I realized it
> wasn't really cross-platform.
Care to provide some evidence/background for your sweeping generalisations?
> Is there any way to use pyramid/pylons without installing it?
What do you mean by "installing"?
> I would
> like to unpackage it and use it as an import, allowing me to move my
> project as a folder to many different computers with different OSes and
> performing normally.
It's more usual to have a requirements.txt or buildout.cfg and install separately on each machine you need it.
Sorry, I didn't mean it wasn't downright incompatible with cross platform. My wording was off. I meant that, If I wanted to do it following the tutorial on the website, I would have to create a script that installs the virtual environment and pyramid for that OS, then run it. I would have to include a binary for each OS in the package to send to each one.
My project in a nutshell was going to just be packaged up, and the user would just download it and the main.py through python shell and enable it, allowing them to see the page.
Thank you for the response in terms of having a requirements.txt, it answered my question since that was something I was kind of hoping to try and avoid.
On Monday, March 4, 2013 12:29:10 PM UTC-8, Chris Withers wrote:
> On 04/03/2013 19:46, Han Chuang wrote: > > I'm trying to plan for one of my projects, and I'm considering using > > pyramid as a base. But while I was fiddling with it, I realized it > > wasn't really cross-platform.
> Care to provide some evidence/background for your sweeping > generalisations?
> > Is there any way to use pyramid/pylons without installing it?
> What do you mean by "installing"?
> > I would > > like to unpackage it and use it as an import, allowing me to move my > > project as a folder to many different computers with different OSes and > > performing normally.
> It's more usual to have a requirements.txt or buildout.cfg and install > separately on each machine you need it.
> I'm trying to plan for one of my projects, and I'm considering using
> pyramid as a base. But while I was fiddling with it, I realized it
> wasn't really cross-platform.
> Is there any way to use pyramid/pylons without installing it? I would
> like to unpackage it and use it as an import, allowing me to move my
> project as a folder to many different computers with different OSes
> and performing normally.
> -- > You received this message because you are subscribed to the Google
> Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pylons-discuss+unsubscribe@googlegroups.com.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> Le 04/03/2013 20:46, Han Chuang a �crit : > > I'm trying to plan for one of my projects, and I'm considering using > > pyramid as a base. But while I was fiddling with it, I realized it > > wasn't really cross-platform. > > Is there any way to use pyramid/pylons without installing it? I would > > like to unpackage it and use it as an import, allowing me to move my > > project as a folder to many different computers with different OSes > > and performing normally. > > -- > > You received this message because you are subscribed to the Google > > Groups "pylons-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to pylons-discus...@googlegroups.com <javascript:>. > > To post to this group, send email to pylons-...@googlegroups.com<javascript:>.
1. you're adding '/pyramid-1.4/pyramid' to the sys.path. that's
looking at the root of your entire system, not the the root of your
project.
2. ruby has something called 'bundler' , which basically automates
virtualenv + pip + routes, or lets you create a "vendor" directory
where you can distribute 3rd party libraries with your code. python
doesn't really have that. this is something you'll deal with on any
Python framework.
There are 2 general ways I've seen people handle this
A. Create a 'lib' or 'extlib' ( external library ) directory . stick
all of your 3rd party libraries in there. note that this will only
work for pure-python libraries -- ones that don't have c extensions.
StackOverflow has a lot of questions on this topic. I strongly
suggest you explore there and ask some questions there as well --
although this involves pyramid, your concerns are really on Python
packaging in general.
In general though -- what you're trying to do is what 99.9999999% of
people who use Python actively avoid and recommend against.