jasperfrumau at gmail.com
Sat Jan 23 03:55:02 PST 2010
On Sat, Jan 23, 2010 at 2:24 PM, Scott Haneda <talklists at newgeo.com> wrote:
> Can you supply the following:
> $head -n1 /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py
$ head -n1 /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py
> This will read the first line of the file django-admin.py
> If it returns:
> #!/usr/bin/env python
> That means the interpreter could be looking in the wrong location,
So it is looking in the wrong location
> the default location set by whoever wrote the code, making the assumption
> that Django is installed in a standard location like most other OS's. This
> is a logical assumption, for example, all perl files on Mac OS X will start
> When a set of files is installed by MacPorts, one step in that installation
> is to 'reinplace'  the #!/usr/bin/perl with a new path pointing to the
> MacPorts perl location.
>  Reinplace is a MacPorts convention that does string find and replacing.
So maybe the maintainer of this port should adjust #!/usr/bin/env python
$ port info py-django
py-django @1.1.1 (python, www)
Description: Django is a high-level Python Web framework that
encourages rapid development and clean, pragmatic design.
Library Dependencies: python24, py-setuptools
Maintainers: arthurk at macports.org
Should I email Artur K as well?
> However, in this case, the path is '/usr/bin/env', and there does not
> appear to be a Portfile for 'env'. I do not know much about `env` and what
> it does when it is given an arguemnt.
Neither do I...
> My guess is that it will look at the $PATH and start looking for the
> python there. This seems a pretty cool use of env for defining you
> interpreter, and I have no idea why #!/usr/bin/env perl and #!/usr/bin/env
> php is not adopted.
> Something to maybe look into and learn more about.
I agree. Will take some time for me to fully understand all this though.
> >>>> then add the django bin to your path, which is probably in one of the
> > Edit ~/.Profile and added the path:
> > $ grep PATH ~/.Profile
> > # MacPorts Installer addition on 2009-10-20_at_13:11:20: adding an
> > appropriate PATH variable for use with MacPorts.
> > export PATH=/opt/local/bin:/opt/local/sbin:$PATH
> > # Finished adapting your PATH environment variable for use with MacPorts.
> > export
> > And:
> > $ django-admin.py
> > Type 'django-admin.py help' for usage.
> > Daniel and Scott you are heroes!!! Thanks a lot! Learned a lot about
> > soft links and other stuff today.
> > Again Thanks! I appreciate it!
> Sure, no problem, have fun with Django and python
> Scott * If you contact me off list replace talklists@ with scott@ *
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macports-users