libo26 / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

Add an empty __init__.py so it can be used as a python package #248

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please, add to the svn tree an empty __init__.py file so Django can use 
feedparser as a module.
I have tested on my installation and it works.
Attaching the patch.
Thanks

Original issue reported on code.google.com by facconi on 20 Jan 2011 at 5:00

Attachments:

GoogleCodeExporter commented 9 years ago
If you're referring to keeping a svn working directory around from which you 
can run the latest code, I think you would actually need two __init__.py files, 
one for the root of the svn working directory, and another for the feedparser 
directory contained in that.

I don't think this will be a useful addition to the svn tree. In particular, 
we're releasing a new version very soon (you can track this by starring issue 
233) and it will include a distutils-based setup.py that you can use to install 
in the standard way:

    $ python setup.py install

Further, feedparser is entirely contained in a single file (remember, you only 
need feedparser.py). It's easy to create a symlink, or to copy it into any 
directory in your PYTHONPATH.

If none of these three options work for you and you're having to work from svn 
trunk it may be helpful to look into virtualenv and pip. Best of my 
understanding, the two are very popular in the Django community because they 
allow fine-grained dependency resolution by using virtual environments. Also, 
pip can pull directly from many different version control systems.

Original comment by kurtmckee on 21 Jan 2011 at 6:24

GoogleCodeExporter commented 9 years ago
Hi, thank you for the answer.
I am using feedparser with an svn:external link, to always have the latest 
version in my staging server.
If it is a problem, it doesn't matter, but I know a lot of people using this 
technique and it is an easy way to have feedparser in Django projects, shared 
between different applications.
I have added to my working copy only one __init__.py file, because I have 
checkouted in my project only the directory named feedparser, the one that 
contains feedparser.py.
Thank you for helping!

Original comment by facconi on 21 Jan 2011 at 9:28