This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252306 - Cannot change python platform for setuptools
Summary: Cannot change python platform for setuptools
Status: VERIFIED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Projects (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jenselme
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-08 16:43 UTC by Jenselme
Modified: 2015-09-19 19:00 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jenselme 2015-05-08 16:43:01 UTC
If I create a new project using setuptools, the python platform cannot be changed with the interface. If I change the platform version, and validate with OK and run the code below :

Code:
    import sys
    if __name__ == '__main__':
        print(sys.version_info


I always get

Code:
    (2, 7, 0, 'candidate', 3)


What is really weird is that if I edit the nb-configuration.xml file and change the python version from there, it works and if I then try to change the python platform through the interface it works properly.

If you try to change the python version when creating a new project, it is also not taken into account.

However, it works perfectly with ant projects.

Product Version: NetBeans IDE Dev (Build 20150505-43463aac3131)
Java: 1.7.0_79; OpenJDK 64-Bit Server VM 24.79-b02
Runtime: OpenJDK Runtime Environment 1.7.0_79-b14
System: Linux version 3.16.7-21-desktop running on amd64; UTF-8; fr_FR (nb)
Comment 1 Jenselme 2015-07-08 19:12:43 UTC
I did some digging: the python platform was correctly saved but not correctly used. I modify project2 so it always uses the platform defined in nb-configuration.xml.

I also managed to allow the user to choose the platform to use when running the project if none is defined in nb-configuration.xml. The user is also able to manage the platforms from this screen.

You can get the patches here: https://bitbucket.org/Jenselme/nb-contrib/commits/branch/bz252306 Review appreciated.
Comment 2 Ralph Ruijs 2015-07-20 07:24:01 UTC
Looks good to me, please integrate into trunk. Thanks!
Comment 3 Jenselme 2015-07-20 17:29:21 UTC
Fixed in http://hg.netbeans.org/main/contrib/rev/28142955865a