Jonathan,

  I ran the 2to3.py script that comes with the python 3.2 install on the 
entire unzipped jenkinsapi folder and then reinstalled the api. It appears 
that I can connect to the Jenkins server. Thanks for all your help.

Josh

On Thursday, December 5, 2013 4:54:33 PM UTC-8, [email protected] wrote:

>
> Jonathan,
>
>   I got Jenkins api from dechols path and unzipped it. It still didn't 
> work. So I went through each .py file and changed every except x, y: to 
> except x as y:. It installed. My script doesn't crash with the line 'import 
> jenkinsapi' at the top. But, it fails when the line 'from 
> jenkinsapi.jenkins import Jenkins' follows. I think more needs to be 
> updated in the py files. I'm trying to get ahold of 2to3 which converts 
> python files from 2 to 3. Hopefully, this will work.
>
> Josh
> On Thursday, December 5, 2013 2:58:18 PM UTC-8, JonathanRRogers wrote:
>
>> Based on the discussion I linked to, it doesn't look like the stable 
>> release of jenkinsapi available via pip or easy_install works with 
>> Python 3.x yet. I would guess that easy_install failed to fully install 
>> jenkinsapi because of 3.x-incompatible code. So, in this case, you will 
>> probably need to get dechols' jenkinsapi fork from his repository: 
>> <URL:https://github.com/dechols/jenkinsapi> 
>>
>> Once you have downloaded the package in a zip file or using git, the 
>> official docs cover how to install it: 
>> <URL:http://docs.python.org/3/install/> <
>> http://docs.python.org/3/install/> 
>>
>> [email protected] wrote: 
>> > I was able to run easy_install to get the Jenkins api and it placed 
>> > python_jenkins-0.2.1-py3.2.egg at C:\Python32\Lib\site-packages. I 
>> > just found out that the file is some sort of a zip file. I changed the 
>> > extension to .zip and unzipped it. I found very little in there 
>> > though. There was just an _init_.py file in 1 folder and 
>> > dependency_links.txt, PKG-INFO, SOURCES.txt, top_level.txt and 
>> > zip-safe file in another folder. I'm no programming genius, but it 
>> > doesn't look like this isn enough to be the api. I have tried running 
>> > scripts with 
>> > import jenkinsapi at the top and the script fails. But, if I comment 
>> > it out, the rest of the script will run, which tells me that the api 
>> > isn't installed right or isn't working. 
>> > 
>> > On Thursday, December 5, 2013 1:39:58 PM UTC-8, JonathanRRogers wrote: 
>> > 
>> >     I don't think you've said exactly what your problem is. Were you 
>> not 
>> >     able to install jenkinsapi? Were you unable to connect to Jenkins 
>> >     using 
>> >     it? I'm not sure using Python 2.7 is out of the question, since one 
>> >     script can run another in a subprocess, though I don't know how 
>> >     much of 
>> >     a hassle that would be in your situation. 
>> > 
>> >     I have only tried jenkinsapi with Python 2.7 so I don't know to 
>> what 
>> >     extent it will or will not work with 3.2. It looks like there has 
>> >     already been some work done to make it work with 3.x, so I'd try 
>> that 
>> >     before giving up. 
>> > 
>> >     <URL:https://github.com/salimfadhley/jenkinsapi/pull/81 
>> >     <https://github.com/salimfadhley/jenkinsapi/pull/81>> 
>> > 
>> >     [email protected] <javascript:> wrote: 
>> >     > Jonathan, 
>> >     > 
>> >     >   again thanks for the information. Unfortunately, using python 
>> >     2.7 is 
>> >     > out of the question. The scripts have to work with our test 
>> >     executive 
>> >     > which is compatible with python 3.2. I will have to go down 
>> another 
>> >     > avenue to complete my task unless they have a version of Jenkins 
>> >     api 
>> >     > that works with python 3.2. Thanks for all the information. It 
>> >     was a 
>> >     > great help. 
>> >     > 
>> >     > Josh 
>> >     > 
>> >     > On Thursday, December 5, 2013 11:56:31 AM UTC-8, JonathanRRogers 
>> >     wrote: 
>> >     > 
>> >     >     OK, you are using CPython then. That is the original and 
>> >     official 
>> >     >     implementation of Python. As you may know, there are two 
>> major 
>> >     >     branches 
>> >     >     of CPython. Python 3.x was intended to make deep, 
>> incompatible 
>> >     >     changes 
>> >     >     to improve or fix long-known problems or limitations in 2.x. 
>> >     >     Therefore, 
>> >     >     some code that works on 2.7 won't work on 3.2 and 
>> >     vice-versa. Many 
>> >     >     projects still only work on 2.x, apparently including 
>> >     jenkinsapi 
>> >     >     according to the pypi listing. 
>> >     > 
>> >     >     I'm not sure what your exact problem has been, but you 
>> >     should try 
>> >     >     using 
>> >     >     jenkinsapi with Python 2.7. It is possible to have more than 
>> >     one 
>> >     >     version 
>> >     >     of Python installed so that different programs can use one 
>> >     or the 
>> >     >     other. 
>> >     >     I haven't done so on Windows, but I have multiple versions 
>> >     built from 
>> >     >     source on Unix-like systems. It looks like it should be even 
>> >     >     easier on 
>> >     >     Windows because the official installers install to 
>> directories 
>> >     >     including 
>> >     >     version number. The following guide looks like it should be 
>> >     >     helpful. I 
>> >     >     strongly recommend using pip and virtualenv, which HOWTO 
>> >     also covers. 
>> >     > 
>> >     >     
>> >     <URL:http://docs.python-guide.org/en/latest/starting/install/win/ 
>> >     <http://docs.python-guide.org/en/latest/starting/install/win/> 
>> >     >     
>> >     <http://docs.python-guide.org/en/latest/starting/install/win/ 
>> >     <http://docs.python-guide.org/en/latest/starting/install/win/>>> 
>> >     > 
>> >     >     [email protected] <javascript:> wrote: 
>> >     >     > Jonathan, 
>> >     >     > 
>> >     >     > thanks for the reply. I do believe I installed the api 
>> using 
>> >     >     > easy_install. Now I'm in the stage trying to verify that 
>> >     the API 
>> >     >     > actually works. The biggest problem here is I'm still very 
>> >     green to 
>> >     >     > Python. The implementation I'm running is 3.2 taken from 
>> >     >     > http://www.python.org/download/releases/3.2/ 
>> >     <http://www.python.org/download/releases/3.2/> 
>> >     >     <http://www.python.org/download/releases/3.2/ 
>> >     <http://www.python.org/download/releases/3.2/>> and I'm running on 
>> >     >     > Windows 7 64 bit. 
>> >     >     > 
>> >     >     > Thanks for your help, 
>> >     >     > 
>> >     >     > Josh 
>> >     >     > 
>> >     >     > On Tuesday, December 3, 2013 3:37:46 PM UTC-8, 
>> >     >     [email protected] wrote: 
>> >     >     > 
>> >     >     >     Hello, 
>> >     >     > 
>> >     >     >       I'm new to Jenkins and use python only to run test 
>> >     scripts on 
>> >     >     >     our custom test executive. We use Python 3.2 and we 
>> wrote 
>> >     >     software 
>> >     >     >     to allow python to communicate with our test 
>> >     executive. I'm 
>> >     >     trying 
>> >     >     >     to figure out how to install the Jenkins API for 
>> python. 
>> >     >     First I 
>> >     >     >     looked into PIP and came across 2 issues: 1) I don't 
>> use 
>> >     >     CPython 
>> >     >     >     and 2) It presents me with the same install issues as 
>> the 
>> >     >     Jenkins 
>> >     >     >     API. Can I merely unzip the API, and drag the 
>> jenkinsapi 
>> >     >     folder to 
>> >     >     >     a specific directory path? Any help would be 
>> appreciated. 
>> >     >     > 
>> >     >     >     Joshua Marberry 
>> >     >     >     Test Software Developer 
>> >     >     >     RED Digital Cinema 
>> >     >     >       
>> >     >     > 
>> >     >     > -- 
>> >     >     > You received this message because you are subscribed to a 
>> >     topic 
>> >     >     in the 
>> >     >     > Google Groups "Jenkins Users" group. 
>> >     >     > To unsubscribe from this topic, visit 
>> >     >     > 
>> >     >     
>> >     
>> https://groups.google.com/d/topic/jenkinsci-users/wn0dLXNgWqE/unsubscribe 
>> >     <
>> https://groups.google.com/d/topic/jenkinsci-users/wn0dLXNgWqE/unsubscribe> 
>>
>> > 
>> >     >     
>> >     <
>> https://groups.google.com/d/topic/jenkinsci-users/wn0dLXNgWqE/unsubscribe 
>> >     <
>> https://groups.google.com/d/topic/jenkinsci-users/wn0dLXNgWqE/unsubscribe>>. 
>>
>> > 
>> >     > 
>> >     >     > To unsubscribe from this group and all its topics, send an 
>> >     email to 
>> >     >     > [email protected] <javascript:>. 
>> >     >     > For more options, visit 
>> >     https://groups.google.com/groups/opt_out 
>> >     <https://groups.google.com/groups/opt_out> 
>> >     >     <https://groups.google.com/groups/opt_out 
>> >     <https://groups.google.com/groups/opt_out>>. 
>> >     > 
>> >     > 
>> >     >     -- 
>> >     >     Jonathan Rogers 
>> >     > 
>> >     > -- 
>> >     > You received this message because you are subscribed to a topic 
>> >     in the 
>> >     > Google Groups "Jenkins Users" group. 
>> >     > To unsubscribe from this topic, visit 
>> >     > 
>> >     
>> https://groups.google.com/d/topic/jenkinsci-users/wn0dLXNgWqE/unsubscribe 
>> >     <
>> https://groups.google.com/d/topic/jenkinsci-users/wn0dLXNgWqE/unsubscribe>. 
>>
>> > 
>> >     > To unsubscribe from this group and all its topics, send an email 
>> to 
>> >     > [email protected] <javascript:>. 
>> >     > For more options, visit https://groups.google.com/groups/opt_out 
>> >     <https://groups.google.com/groups/opt_out>. 
>> > 
>> > 
>> >     -- 
>> >     Jonathan Rogers 
>> > 
>> > -- 
>> > You received this message because you are subscribed to a topic in the 
>> > Google Groups "Jenkins Users" group. 
>> > To unsubscribe from this topic, visit 
>> > 
>> https://groups.google.com/d/topic/jenkinsci-users/wn0dLXNgWqE/unsubscribe. 
>>
>> > To unsubscribe from this group and all its topics, send an email to 
>> > [email protected]. 
>> > For more options, visit https://groups.google.com/groups/opt_out. 
>>
>>
>> -- 
>> Jonathan Rogers 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to