setup.py develop issues

I am having issues with using setup.py develop on my computer at work. My understanding of the command is that it should make my project import-able without really installing it, so that I can continue to change my files without needing to reinstall the project. Here is a minimum example of the problem. I create a new project (named project) with only a single package, and create the minimum setup.py file that I thought would work. mkdir project cd project mkdir project echo. > project\__init__.py echo.from setuptools import setup>setup.py echo.setup(>>setup.py echo. name='project',>>setup.py echo. packages=['project'],>>setup.py echo.^)>>setup.py cd .. After running these commands (as a batch script), I did cd project python setup.py develop but the project was not importable. I can import it when I run `python setup.py install` though. Here is the output of running python setup.py develop: C:\Users\CWP\Development\project>python setup.py develop running develop running egg_info creating project.egg-info writing top-level names to project.egg-info\top_level.txt writing project.egg-info\PKG-INFO writing dependency_links to project.egg-info\dependency_links.txt writing manifest file 'project.egg-info\SOURCES.txt' reading manifest file 'project.egg-info\SOURCES.txt' writing manifest file 'project.egg-info\SOURCES.txt' running build_ext Creating c:\python34\lib\site-packages\project.egg-link (link to .) Adding project 0.0.0 to easy-install.pth file Installed c:\users\cwp\development\project Processing dependencies for project==0.0.0 Finished processing dependencies for project==0.0.0 I'm using Python 3.4.0 and setuptools 6.0.2. I'm not sure if I'm using setuptools wrong, if my understanding of setuptools is wrong, or if this is a bug in setuptools under Windows. Cody

using pip on your setup.py works for me (in py2.7 though) D:\test> make-project.bat D:\test> pip install --editable project\. Obtaining file:///d%7C%5Ctest%5Cproject Running setup.py egg_info for package from file:///d%7C%5Ctest%5Cproject Installing collected packages: project Running setup.py develop for project Creating c:\python27\arcgis10.2\lib\site-packages\project.egg-link (link to .) Adding project 0.0.0 to easy-install.pth file Installed d:\test\project Successfully installed project Cleaning up... D:\test> python -c "import project" (empty line means success) cheers, -matt On Tue, Oct 7, 2014 at 10:28 AM, Cody Piersall <cody.piersall@gmail.com> wrote:
I am having issues with using setup.py develop on my computer at work. My understanding of the command is that it should make my project import-able without really installing it, so that I can continue to change my files without needing to reinstall the project.
Here is a minimum example of the problem. I create a new project (named project) with only a single package, and create the minimum setup.py file that I thought would work.
mkdir project cd project mkdir project echo. > project\__init__.py echo.from setuptools import setup>setup.py echo.setup(>>setup.py echo. name='project',>>setup.py echo. packages=['project'],>>setup.py echo.^)>>setup.py cd ..
After running these commands (as a batch script), I did
cd project python setup.py develop
but the project was not importable. I can import it when I run `python setup.py install` though. Here is the output of running python setup.py develop:
C:\Users\CWP\Development\project>python setup.py develop running develop running egg_info creating project.egg-info writing top-level names to project.egg-info\top_level.txt writing project.egg-info\PKG-INFO writing dependency_links to project.egg-info\dependency_links.txt writing manifest file 'project.egg-info\SOURCES.txt' reading manifest file 'project.egg-info\SOURCES.txt' writing manifest file 'project.egg-info\SOURCES.txt' running build_ext Creating c:\python34\lib\site-packages\project.egg-link (link to .) Adding project 0.0.0 to easy-install.pth file Installed c:\users\cwp\development\project Processing dependencies for project==0.0.0 Finished processing dependencies for project==0.0.0
I'm using Python 3.4.0 and setuptools 6.0.2. I'm not sure if I'm using setuptools wrong, if my understanding of setuptools is wrong, or if this is a bug in setuptools under Windows.
Cody
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig

On Tue, Oct 7, 2014 at 2:29 PM, Matt Wilkie <maphew@gmail.com> wrote:
using pip on your setup.py works for me (in py2.7 though)
D:\test> make-project.bat
D:\test> pip install --editable project\. Obtaining file:///d%7C%5Ctest%5Cproject Running setup.py egg_info for package from file:///d%7C%5Ctest%5Cproject
Installing collected packages: project Running setup.py develop for project
Creating c:\python27\arcgis10.2\lib\site-packages\project.egg-link
(link to .)
Adding project 0.0.0 to easy-install.pth file
Installed d:\test\project Successfully installed project Cleaning up...
D:\test> python -c "import project"
(empty line means success)
cheers,
-matt
Unfortunately, using pip with Python 3 still didn't work for me. Cody
participants (2)
-
Cody Piersall
-
Matt Wilkie