Some questions about setuptools
![](https://secure.gravatar.com/avatar/4fbac4249bdfb5c08b63692f4617223b.jpg?s=120&d=mm&r=g)
I'm new to setuptools. One question is: Recently I want to use setuptools for a project. My command line is just like : python setup.py sdist --formats=gztar But I found some deleted files also included in the package. These files are .pyc suffixed. I use subversion. I checked the setuptools' code, and found that setuptools indeed follows the .svn/entries file, but it only retrieves files, and check if the file is exist. But in my entries file, just like: <entry name="EasyElements.pyc" kind="file" deleted="true" revision="33"/> You can see the "deleted" field is "true", so the file should not be included in the package, even through the file is exist. So I think maybe the .pyc, .pyo file should be omited. The another question is: I have below directory structure: A/ setup.py B/ __init__.py b.py t.txt .svn/ entries So B is a package dir. But as I run setup.py, the t.txt is not include in the package. I followed the source code and found it was because that dir A hasn't in version control, i.e. there is not .svn directory in dir A, so the setuptools could not traversal the subdirectory. I don't know how to write my setup.py script. I'm sorry may be this letter is not suit for this maillist. -- I like python! My Donews Blog: http://www.donews.net/limodou New Google Maillist: http://groups-beta.google.com/group/python-cn
![](https://secure.gravatar.com/avatar/eaa875d37f5e9ca7d663f1372efa1317.jpg?s=120&d=mm&r=g)
At 07:59 PM 8/5/2005 +0800, limodou wrote:
But I found some deleted files also included in the package. These files are .pyc suffixed. I use subversion. I checked the setuptools' code, and found that setuptools indeed follows the .svn/entries file, but it only retrieves files, and check if the file is exist. But in my entries file, just like:
<entry name="EasyElements.pyc" kind="file" deleted="true" revision="33"/>
You can see the "deleted" field is "true", so the file should not be included in the package, even through the file is exist. So I think maybe the .pyc, .pyo file should be omited.
Did you try checking in your changes first?
The another question is:
I have below directory structure:
A/ setup.py B/ __init__.py b.py t.txt .svn/ entries
So B is a package dir. But as I run setup.py, the t.txt is not include in the package. I followed the source code and found it was because that dir A hasn't in version control, i.e. there is not .svn directory in dir A, so the setuptools could not traversal the subdirectory. I don't know how to write my setup.py script.
You need to put directory A under revision control as well; the entire project needs to be in Subversion (or CVS) for setuptools' automatic source finding to work.
![](https://secure.gravatar.com/avatar/4fbac4249bdfb5c08b63692f4617223b.jpg?s=120&d=mm&r=g)
2005/8/5, Phillip J. Eby <pje@telecommunity.com>:
At 07:59 PM 8/5/2005 +0800, limodou wrote:
But I found some deleted files also included in the package. These files are .pyc suffixed. I use subversion. I checked the setuptools' code, and found that setuptools indeed follows the .svn/entries file, but it only retrieves files, and check if the file is exist. But in my entries file, just like:
<entry name="EasyElements.pyc" kind="file" deleted="true" revision="33"/>
You can see the "deleted" field is "true", so the file should not be included in the package, even through the file is exist. So I think maybe the .pyc, .pyo file should be omited.
Did you try checking in your changes first?
Yes, I did. In entries file, the deleted entries are still in there.
The another question is:
I have below directory structure:
A/ setup.py B/ __init__.py b.py t.txt .svn/ entries
So B is a package dir. But as I run setup.py, the t.txt is not include in the package. I followed the source code and found it was because that dir A hasn't in version control, i.e. there is not .svn directory in dir A, so the setuptools could not traversal the subdirectory. I don't know how to write my setup.py script.
You need to put directory A under revision control as well; the entire project needs to be in Subversion (or CVS) for setuptools' automatic source finding to work.
I think I can only do like what your said at present. Thanks. -- I like python! My Donews Blog: http://www.donews.net/limodou New Google Maillist: http://groups-beta.google.com/group/python-cn
![](https://secure.gravatar.com/avatar/eaa875d37f5e9ca7d663f1372efa1317.jpg?s=120&d=mm&r=g)
At 08:35 AM 8/6/2005 +0800, limodou wrote:
2005/8/5, Phillip J. Eby <pje@telecommunity.com>:
At 07:59 PM 8/5/2005 +0800, limodou wrote:
But I found some deleted files also included in the package. These files are .pyc suffixed. I use subversion. I checked the setuptools' code, and found that setuptools indeed follows the .svn/entries file, but it only retrieves files, and check if the file is exist. But in my entries file, just like:
<entry name="EasyElements.pyc" kind="file" deleted="true" revision="33"/>
You can see the "deleted" field is "true", so the file should not be included in the package, even through the file is exist. So I think maybe the .pyc, .pyo file should be omited.
Did you try checking in your changes first?
Yes, I did. In entries file, the deleted entries are still in there.
That seems odd; I grepped through several large projects of mine for a 'deleted' entry in an entries file, and didn't find any. What version of Subversion do you use?
![](https://secure.gravatar.com/avatar/4fbac4249bdfb5c08b63692f4617223b.jpg?s=120&d=mm&r=g)
2005/8/6, Phillip J. Eby <pje@telecommunity.com>:
At 08:35 AM 8/6/2005 +0800, limodou wrote:
2005/8/5, Phillip J. Eby <pje@telecommunity.com>:
At 07:59 PM 8/5/2005 +0800, limodou wrote:
But I found some deleted files also included in the package. These files are .pyc suffixed. I use subversion. I checked the setuptools' code, and found that setuptools indeed follows the .svn/entries file, but it only retrieves files, and check if the file is exist. But in my entries file, just like:
<entry name="EasyElements.pyc" kind="file" deleted="true" revision="33"/>
You can see the "deleted" field is "true", so the file should not be included in the package, even through the file is exist. So I think maybe the .pyc, .pyo file should be omited.
Did you try checking in your changes first?
Yes, I did. In entries file, the deleted entries are still in there.
That seems odd; I grepped through several large projects of mine for a 'deleted' entry in an entries file, and didn't find any. What version of Subversion do you use?
0.5a13 I want to ask if deleted files entries are also in .svn/entries? -- I like python! My Donews Blog: http://www.donews.net/limodou New Google Maillist: http://groups-beta.google.com/group/python-cn
![](https://secure.gravatar.com/avatar/eaa875d37f5e9ca7d663f1372efa1317.jpg?s=120&d=mm&r=g)
At 01:39 PM 8/6/2005 +0800, limodou wrote:
2005/8/6, Phillip J. Eby <pje@telecommunity.com>:
At 08:35 AM 8/6/2005 +0800, limodou wrote:
2005/8/5, Phillip J. Eby <pje@telecommunity.com>:
At 07:59 PM 8/5/2005 +0800, limodou wrote:
But I found some deleted files also included in the package. These files are .pyc suffixed. I use subversion. I checked the setuptools' code, and found that setuptools indeed follows the .svn/entries file, but it only retrieves files, and check if the file is exist. But in my entries file, just like:
<entry name="EasyElements.pyc" kind="file" deleted="true" revision="33"/>
You can see the "deleted" field is "true", so the file should not be included in the package, even through the file is exist. So I think maybe the .pyc, .pyo file should be omited.
Did you try checking in your changes first?
Yes, I did. In entries file, the deleted entries are still in there.
That seems odd; I grepped through several large projects of mine for a 'deleted' entry in an entries file, and didn't find any. What version of Subversion do you use?
0.5a13
No, what version of *Subversion* are you using, not what setuptools version.
I want to ask if deleted files entries are also in .svn/entries?
I'm not seeing any in my projects, that's why I'm asking. Of course, I have configured Subversion to ignore *.pyc and *.pyo files; it looks to me like maybe you've done something different with yours?
![](https://secure.gravatar.com/avatar/4fbac4249bdfb5c08b63692f4617223b.jpg?s=120&d=mm&r=g)
2005/8/6, Phillip J. Eby <pje@telecommunity.com>:
At 01:39 PM 8/6/2005 +0800, limodou wrote:
2005/8/6, Phillip J. Eby <pje@telecommunity.com>:
At 08:35 AM 8/6/2005 +0800, limodou wrote:
2005/8/5, Phillip J. Eby <pje@telecommunity.com>:
At 07:59 PM 8/5/2005 +0800, limodou wrote:
But I found some deleted files also included in the package. These files are .pyc suffixed. I use subversion. I checked the setuptools' code, and found that setuptools indeed follows the .svn/entries file, but it only retrieves files, and check if the file is exist. But in my entries file, just like:
<entry name="EasyElements.pyc" kind="file" deleted="true" revision="33"/>
You can see the "deleted" field is "true", so the file should not be included in the package, even through the file is exist. So I think maybe the .pyc, .pyo file should be omited.
Did you try checking in your changes first?
Yes, I did. In entries file, the deleted entries are still in there.
That seems odd; I grepped through several large projects of mine for a 'deleted' entry in an entries file, and didn't find any. What version of Subversion do you use?
0.5a13
No, what version of *Subversion* are you using, not what setuptools version.
I want to ask if deleted files entries are also in .svn/entries?
I'm not seeing any in my projects, that's why I'm asking. Of course, I have configured Subversion to ignore *.pyc and *.pyo files; it looks to me like maybe you've done something different with yours?
TortoiseSVN 1.1.3, Build 2502, UNICODE Subversion 1.1.3, -- I like python! My Donews Blog: http://www.donews.net/limodou New Google Maillist: http://groups-beta.google.com/group/python-cn
![](https://secure.gravatar.com/avatar/c8dfd6bec924a7ac20affcbcfe20e7f4.jpg?s=120&d=mm&r=g)
I'm using svn 1.1.4 and I just confirmed that I have deleted files (that are committed as deleted) in my .svn/entries files. Kevin
![](https://secure.gravatar.com/avatar/eaa875d37f5e9ca7d663f1372efa1317.jpg?s=120&d=mm&r=g)
At 08:51 AM 8/6/2005 -0400, Kevin Dangoor wrote:
I'm using svn 1.1.4 and I just confirmed that I have deleted files (that are committed as deleted) in my .svn/entries files.
I've attached a patch that attempts to detect and ignore deleted entries; please let me know if it works for you.
![](https://secure.gravatar.com/avatar/4fbac4249bdfb5c08b63692f4617223b.jpg?s=120&d=mm&r=g)
2005/8/7, Phillip J. Eby <pje@telecommunity.com>:
At 08:51 AM 8/6/2005 -0400, Kevin Dangoor wrote:
I'm using svn 1.1.4 and I just confirmed that I have deleted files (that are committed as deleted) in my .svn/entries files.
I've attached a patch that attempts to detect and ignore deleted entries; please let me know if it works for you.
This patch runs well. I think the real reason is because I didn't ignore the .pyc files, so the deleted .pyc files exist in the .svn/entries. If it is a common file, as I delete it from svn, the real file will be removed, so setuptools will not find the file, everything is ok. But as I test the python file, .pyc will be created automatically, and the setuptools will not notice that file was deleted, it will still get the filename from .svn/entries, so that the deleted .pyc files are involved in the package. So I think the patch is right, so I don't need to care about to must ignore the .pyc , .pyo files. -- I like python! My Donews Blog: http://www.donews.net/limodou New Google Maillist: http://groups-beta.google.com/group/python-cn
![](https://secure.gravatar.com/avatar/4fbac4249bdfb5c08b63692f4617223b.jpg?s=120&d=mm&r=g)
2005/8/6, Phillip J. Eby <pje@telecommunity.com>:
At 01:39 PM 8/6/2005 +0800, limodou wrote:
2005/8/6, Phillip J. Eby <pje@telecommunity.com>:
At 08:35 AM 8/6/2005 +0800, limodou wrote:
2005/8/5, Phillip J. Eby <pje@telecommunity.com>:
At 07:59 PM 8/5/2005 +0800, limodou wrote:
But I found some deleted files also included in the package. These files are .pyc suffixed. I use subversion. I checked the setuptools' code, and found that setuptools indeed follows the .svn/entries file, but it only retrieves files, and check if the file is exist. But in my entries file, just like:
<entry name="EasyElements.pyc" kind="file" deleted="true" revision="33"/>
You can see the "deleted" field is "true", so the file should not be included in the package, even through the file is exist. So I think maybe the .pyc, .pyo file should be omited.
Did you try checking in your changes first?
Yes, I did. In entries file, the deleted entries are still in there.
That seems odd; I grepped through several large projects of mine for a 'deleted' entry in an entries file, and didn't find any. What version of Subversion do you use?
0.5a13
No, what version of *Subversion* are you using, not what setuptools version.
I want to ask if deleted files entries are also in .svn/entries?
I'm not seeing any in my projects, that's why I'm asking. Of course, I have configured Subversion to ignore *.pyc and *.pyo files; it looks to me like maybe you've done something different with yours?
I think the problem is solved. As I configured svn to ignore *.pyc, there are no deleted file entries in the .svn/entries file. So the process is perfect. Thanks a lot for your help. -- I like python! My Donews Blog: http://www.donews.net/limodou New Google Maillist: http://groups-beta.google.com/group/python-cn
participants (3)
-
Kevin Dangoor
-
limodou
-
Phillip J. Eby