google-code-export / pymssql

Automatically exported from code.google.com/p/pymssql
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Error when executing setup.py {build,develop} on a system with no setuptools: "name 'STDevelopCmd' is not defined" #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to install pymmsql-2.0.0b1-dev-20111019

What steps will reproduce the problem?
1. python setup.py develop

What is the expected output? What do you see instead?

$ python setup.py develop
Traceback (most recent call last):
  File "setup.py", line 252, in <module>
    class DevelopCmd(STDevelopCmd):
NameError: name 'STDevelopCmd' is not defined

What version of the product are you using? On what operating system?

Cygwin
Python 2.6.8

Please provide any additional information below.

Original issue reported on code.google.com by douglasl...@gmail.com on 31 Aug 2012 at 6:20

GoogleCodeExporter commented 9 years ago
Same error I'm having when installing pymssql
 python setup.py develop

python 2.6 
downloaded pymssql-2.0.0b1-dev-20111019

OS: Ubuntu Lucid

Original comment by jayr.a...@gmail.com on 17 Sep 2012 at 6:20

GoogleCodeExporter commented 9 years ago
Same here. Exact same setup as jayr. OS - Centos

Original comment by Eran.He...@aimeesoft.com on 30 Oct 2012 at 9:19

GoogleCodeExporter commented 9 years ago
Is this still happening with the latest hg tip?

If so, can you paste the results of `pip freeze`? I'm wondering if setuptools 
is missing?

Original comment by msabr...@gmail.com on 7 Jan 2013 at 5:46

GoogleCodeExporter commented 9 years ago
I was just able to reproduce this in a CentoOS 6.3 system, which has Python 
2.6.6 but no setuptools by hg cloning pymssql and then running `python setup.py 
build` TWICE.

https://gist.github.com/4519966

MAYBE the problem is with the automatic downloading/installation of setuptools. 
For me, it seems to download a setuptools egg but not add it to sys.path so 
it's not available. `import setuptools` fails at a Python prompt for me, but 
then I manually add the egg to sys.path and do `import setuptools` again and 
then it works. So it seems like ez_setup.py is not installing setuptools 
correctly.

setuptools is kind of old and unmaintained. I don't know how much time I'd want 
to spend on this.

Original comment by msabr...@gmail.com on 12 Jan 2013 at 7:42

GoogleCodeExporter commented 9 years ago
Indeed, what is happening is that when setuptools is not installed, then an 
import exception is created:

http://code.google.com/p/pymssql/source/browse/setup.py#31

The code path under Except doesn't include the STDevelopCmd definition.  You 
could try the same definition in the Except clause, but the question is whether 
the ez_setup.py version of setuptools includes .command.develop.develop.

> setuptools is kind of old and unmaintained.

Maybe but it, and Distribute (a fork), are still very prominent in Python 
community.  Furthermore, our setup.py file is heavily dependent on it and I'm 
not sure how you'd even go about not using setuptools in our situation.  If the 
develop command is available in the ez_setup.py version, then this will be an 
easy fix.  If not, then I think we are going to have to say something like:

> You can install pymssql without SetupTools, but you will need it if you want 
to do development.

And then just make sure thats true with the current setup.py.

Original comment by randy.sy...@lev12.com on 14 Jan 2013 at 3:16

GoogleCodeExporter commented 9 years ago
The following seems to fix it:

[marca@localhost pymssql]$ hg diff diff -r 08ae783880dd setup.py --- a/setup.py Wed Jan 09 16:35:50 2013 -0800 +++ b/setup.py Mon Jan 14 08:15:34 2013 -0800 @@ -35,6 +35,7 @@ import ez_setup ez_setup.use_setuptools() from setuptools import setup, Extension

Original comment by msabr...@gmail.com on 14 Jan 2013 at 4:19

GoogleCodeExporter commented 9 years ago

Original comment by msabr...@gmail.com on 14 Jan 2013 at 5:48

GoogleCodeExporter commented 9 years ago
Should be fixed by 
http://code.google.com/p/pymssql/source/detail?r=5222ee37b2ab92421116c57d7029fee
4b3f4291b

I verified this change on a CentOS 6.3 system with no setuptools installed.

Original comment by msabr...@gmail.com on 14 Jan 2013 at 6:05