When VS2015 installation is completed, I got following notification about the setup process result related with Windows 10 and Windows Mobile 10 platforms. Probably since I run the setup on Windows 7 computer, I got fail warnings for Windows 10 SDK and for Emulators for Windows Mobile 10. Some builds are small (like the 14 MB vs2015-qt4-playground.zip demo build), some builds are big, like the following ones. Configure.qt-src-4.8.7configure.exe -prefix C:QtVS2015x64qt-4.8.7 -opensource -confirm-license -developer-build -debug-and-release -nomake doc -nomake examples -nomake demos -platform win32-msvc2015 -no-qt3support -no-phonon -no-phonon-backend. 7月21日凌晨消息，面向大众用户的Visual Studio 2015正式版免费试用版已经推出。本文帮大家汇总一下简体中文社区版、专业版以及企业版在线安装以及ISO离线安装镜像下载地址。.
VS2015 Community edition enables developers to build cross-platform mobile applications for Windows, Android, and iOS. Download size of vs2015.rccomenu.iso setup file for VS2015 Community Edition is about 3,56 GB Download Visual Studio 2015 Enterprise Free RC Edition.
Note: Visual Studio 2017 is recommended for developing .NET Standard libraries. Visual Studio 2015 can work but the .NET Core tooling was brought only to Preview state. See Create and publish a package with Visual Studio 2017 for working with NuGet 4.x+ and Visual Studio 2017.
The .NET Standard Library is a formal specification of .NET APIs intended to be available on all .NET runtimes, thus establishing greater uniformity in the .NET ecosystem. The .NET Standard Library defines a uniform set of BCL (Base Class Library) APIs for all .NET platforms to implement, independent of workload. It enables developers to produce code that is usable across all .NET runtimes, and reduces if not eliminates platform-specific conditional compilation directives in shared code.
This guide walks you through creating a NuGet package targeting .NET Standard Library 1.4 or a package targeting .NET Framework 4.6. A .NET Standard 1.4 library works across .NET Framework 4.6.1, Universal Windows Platform 10, .NET Core, and Mono/Xamarin. For details, see the .NET Standard mapping table (.NET documentation). You can choose other version of the .NET Standard Library if you want.
Visual Studio 2015 Update 3
(.NET Standard only) .NET Core SDK
NuGet CLI. Download the latest version of nuget.exe from nuget.org/downloads, saving it to a location of your choice. Then add that location to your PATH environment variable if it isn't already.
nuget.exe is the CLI tool itself, not an installer, so be sure to save the downloaded file from your browser instead of running it.
Create the class library project
In Visual Studio, File > New > Project, expand the Visual C# > Windows node, select Class Library (Portable), change the name to AppLogger, and select OK.
In the Add Portable Class Library dialog that appears, select the options for
.NET Framework 4.6and
ASP.NET Core 1.0. (If targeting .NET Framework, you can select whichever options are appropriate.)
If targeting .NET Standard, right-click the
AppLogger (Portable)in Solution Explorer, select Properties, select the Library tab, then select Target .NET Platform Standard in the Targeting section. This action prompts for confirmation, after which you can select
.NET Standard 1.4(or another available version) from the drop down:
Click on the Build tab, change the Configuration to
Release, and check the box for XML documentation file.
Add your code to the component, for example:
Set the configuration to Release, build the project, and check that DLL and XML files are produced within the
Create and update the .nuspec file
Open a command prompt, navigate to the folder containing
AppLogger.csprojfolder (one level below where the
.slnfile is), and run the NuGet
speccommand to create the initial
AppLogger.nuspecin an editor and update it to match the following, replacing YOUR_NAME with an appropriate value. The
<id>value, specifically, must be unique across nuget.org (see the naming conventions described in Creating a package. Also note that you must also update the author and description tags or you get an error during the packing step.
Add reference assemblies to the
.nuspecfile, namely the library's DLL and the IntelliSense XML file:
If targeting .NET Standard, the entries appear similar to the following:
If targeting .NET Framework, the entries appear similar to the following:
Right-click the solution and select Build Solution to generate all the files for the package.
If you have any dependencies on other NuGet packages, list those in the manifest's
<dependencies> element with
<group> elements. For example, to declare a dependency on NewtonSoft.Json 8.0.3 or above, add the following:
The syntax of the version attribute here indicates that version 8.0.3 or above is acceptable. To specify different version ranges, refer to Package versioning.
Adding a readme
readme.txt file, place it in the project root folder, and refer to it in the
Visual Studio display
readme.txt when the package is installed into a project. The file is not shown when installed into .NET Core projects, or for packages that are installed as a dependency.
Package the component
With the completed
.nuspec referencing all the files you need to include in the package, you're ready to run the
AppLogger.YOUR_NAME.1.0.0.nupkg. Opening this file in a tool like the NuGet Package Explorer and expanding all the nodes, you see the following contents (shown for .NET Standard):
.nupkg file is just a ZIP file with a different extension. You can also examine package contents, then, by changing
.zip, but remember to restore the extension before uploading a package to nuget.org.
To make your package available to other developers, follow the instructions on Publish a package.
pack requires Mono 4.4.2 on Mac OS X and does not work on Linux systems. On a Mac, you must also convert Windows pathnames in the
.nuspec file to Unix-style paths.
These instructions cover how to get a working copy of the source code and acompiled version of the CPython interpreter (CPython is the version of Pythonavailable from https://www.python.org/). It also gives an overview of thedirectory structure of the CPython source code.
Alternatively, if you have Docker installed youmight want to use our official images. Thesecontain the latest releases of several Python versions, along with git head,and are provided for development and testing purposes only.
The Quick Reference gives brief summary of the process frominstalling git to submitting a pull request.
CPython is developed using git for version control. The gitcommand line program is named
git; this is also used to refer to gititself. git is easily available for all common operating systems.
As the CPython repo is hosted on GitHub, please refer to either theGitHub setup instructionsor the git project instructions for step-by-stepinstallation directions. You may also want to consider a graphical clientsuch as TortoiseGit orGitHub Desktop.
Configure your name and email and createan SSH keyas this will allow you to interact with GitHub without typing a usernameand password each time you execute a command, such as
gitfetch. On Windows, you should alsoenable autocrlf.
1.2. Get the source code¶
The CPython repo is hosted on GitHub. To get a copy of the source code you shouldfork the Python repository on GitHub, create a localclone of your personal fork, and configure the remotes.
You will only need to execute these steps once:
Go to https://github.com/python/cpython.
Press Fork on the top right.
When asked where to fork the repository, choose to fork it to your username.
Your fork will be created at
Clone your GitHub fork (replace
<username>with your username):
(You can use both SSH-based or HTTPS-based URLs.)
Verify that your setup is correct:
If you did everything correctly, you should now have a copy of the codein the
cpython directory and two remotes that refer to your own GitHub fork(
origin) and the official CPython repository (
If you want a working copy of an already-released version of Python,i.e., a version in maintenance mode, you can checkouta release branch. For instance, to checkout a working copy of Python 3.8,do
You will need to re-compile CPython when you do such an update.
Do note that CPython will notice that it is being run from a working copy.This means that if you edit CPython’s source code in your working copy,changes to Python code will be picked up by the interpreter for immediateuse and testing. (If you change C code, you will need to recompile theaffected files as described below.)
Patches for the documentation can be made from the same repository; seeDocumenting Python.
1.3. Compile and build¶
CPython provides several compilation flags which help with debugging variousthings. While all of the known flags can be found in the
Misc/SpecialBuilds.txt file, the most critical one is the
Py_DEBUG flagwhich creates what is known as a “pydebug” build. This flag turns on variousextra sanity checks which help catch common issues. The use of the flag is socommon that turning on the flag is a basic compile option.
You should always develop under a pydebug build of CPython (the only instance ofwhen you shouldn’t is if you are taking performance measurements). Even whenworking only on pure Python code the pydebug build provides several usefulchecks that one should not skip.
The core CPython interpreter only needs a C compiler to be built,however, some of the extension modules will need development headersfor additional libraries (such as the
zlib library for compression).Depending on what you intend to work on, you might need to install theseadditional requirements so that the compiled interpreter supports thedesired features.
If you want to install these optional dependencies, consult theInstall dependencies section below.
If you don’t need to install them, the basic steps for building Pythonfor development is to configure it and then compile it.
Configuration is typically:
More flags are available to
configure, but this is the minimum you shoulddo to get a pydebug build of CPython.
You might need to run
makeclean before or after re-running
configurein a particular build directory.
configure is done, you can then compile CPython with:
This will build CPython with only warnings and errors being printed tostderr and utilize up to 2 CPU cores. If you are using a multi-core machinewith more than 2 cores (or a single-core machine), you can adjust the numberpassed into the
-j flag to match the number of cores you have (or if yourversion of Make supports it, you can use
-j without a number and Makewill not limit the number of steps that can run simultaneously.).
At the end of the build you should see a success message, possibly followedby a list of extension modules that haven’t been built because theirdependencies were missing:
If the build failed and you are using a C89 or C99-compliant compiler,please open a bug report.
If you decide to Install dependencies, you will need to re-run both
Once CPython is done building you will then have a working buildthat can be run in-place;
./python on most machines (and what is used inall examples),
./python.exe wherever a case-insensitive filesystem is used(e.g. on OS X by default), in order to avoid conflicts with the
Pythondirectory. There is normally no need to install your built copyof Python! The interpreter will realize where it is being run fromand thus use the files found in the working copy. If you are worriedyou might accidentally install your working copy build, you can add
--prefix=/tmp/python to the configuration step. When running from yourworking directory, it is best to avoid using the
configure; unless you are very careful, you may accidentally runwith code from an older, installed shared Python library rather than fromthe interpreter you just built.
If you are using clang to build CPython, some flags you might want to set toquiet some standard warnings which are specifically superfluous to CPython are
-Wno-unused-value-Wno-empty-body-Qunused-arguments. You can set your
CFLAGS environment variable to these flags when running
If you are using clang with ccache, turn off the noisy
parentheses-equality warnings with the
-Wno-parentheses-equality flag.These warnings are caused by clang not having enough information to detectthat extraneous parentheses in expanded macros are valid, because thepreprocessing is done separately by ccache.
If you are using LLVM 2.8, also use the
-no-integrated-as flag in order tobuild the
ctypes module (without the flag the rest of CPython willstill build properly).
For a quick guide to building you can read this documentation from VictorStinner.
Python 3.6 and later can use Microsoft Visual Studio 2017. You can downloadand use any of the free or paid versions of Visual Studio 2017.
When installing Visual Studio 2017, select the Python development workloadand the optional Python native development tools component to obtain all ofthe necessary build tools. If you do not already have git installed, you canfind git for Windows on the Individual components tab of the installer.
If you want to build MSI installers, be aware that the build toolchainfor them has a dependency on the Microsoft .NET Framework Version 3.5 (whichmay not be configured on recent versions of Windows, such as Windows 10). Ifyou are building on a recent Windows version, use the Control Panel (Programs Programs and Features Turn Windows Features on or off) and ensure that theentry “.NET Framework 3.5 (includes .NET 2.0 and 3.0)” is enabled.
Your first build should use the command line to ensure any external dependenciesare downloaded:
After this build succeeds, you can open the
PCBuildpcbuild.sln solution inVisual Studio to continue development.
See the readme for more details on what other software is necessary and howto build.
Python 2.7 uses Microsoft Visual Studio 2008, which is most easilyobtained through an MSDN subscription. To use the build files in thePCbuild directory you will also need Visual Studio 2010, see the 2.7readme for more details. If you have VS 2008 but not 2010 you can use thebuild files in the PC/VS9.0 directory, see the VS9 readme for details.
Vs2015 Update 3
If you are using the Windows Subsystem for Linux (WSL), clone therepository from a native Windows terminal program like cmd.exe command promptor PowerShell as well as use a build of git targeted for Windows, e.g., theofficial one from https://git-scm.com. Otherwise, Visual Studio willnot be able to find all the project’s files and will fail the build.
1.4. Install dependencies¶
This section explains how to install additional extensions (e.g.
zlib)on Linux and macOs/OS X. On Windows,extensions are already included and built automatically.
For UNIX based systems, we try to use system libraries whenever available.This means optional components will only build if the relevant system headersare available. The best way to obtain the appropriate headers will vary bydistribution, but the appropriate commands for some popular distributionsare below.
On Fedora, Red Hat Enterprise Linux and other
yum based systems:
On Fedora and other
DNF based systems:
On Debian, Ubuntu, and other
apt based systems, try to get thedependencies for the Python you’re working on by using the
First, make sure you have enabled the source packages in the sources list.You can do this by adding the location of the source packages, includingURL, distribution name and component name, to
/etc/apt/sources.list.Take Ubuntu Bionic for example:
For other distributions, like Debian, change the URL and names to correspondwith the specific distribution.
Then you should update the packages index:
Now you can install the build dependencies via
If that package is not available for your system, try reducing the minorversion until you find a package that is available.
1.4.2. macOS and OS X¶
For macOS systems (versions 10.12+) and OS X 10.9 and later,the Developer Tools can be downloaded and installed automatically;you do not need to download the complete Xcode application.
If necessary, run the following:
This will also ensure that the system header files are installed into
On Mac OS X systems (versions 10.0 - 10.7) and OS X 10.8, use the Ccompiler and other development utilities provided by Apple’s Xcode DeveloperTools. The Developer Tools are not shipped with Mac OS X.
For these older releases (versions 10.0 - 10.8), you will need to download either thecorrect version of the Command Line Tools, if available, or install them from thefull Xcode app or package for that OS X release. Older versions may beavailable either as a no-cost download through Apple’s App Store or fromthe Apple Developer web site.
Also note that OS X does not include several libraries used by the Pythonstandard library, including
libzma, so expect to see some extension modulebuild failures unless you install local copies of them. As of OS X 10.11,Apple no longer provides header files for the deprecated system version ofOpenSSL which means that you will not be able to build the
_ssl extension.One solution is to install these libraries from a third-party packagemanager, like Homebrew or MacPorts, and then add the appropriate pathsfor the header and library files to your
configure command. For example,
configure Python versions >= 3.7:
configure Python versions < 3.7:
There will sometimes be optional modules added for a new release whichwon’t yet be identified in the OS level build dependencies. In those cases,just ask for assistance on the core-mentorship list. If working on bugfixes for Python 2.7, use
python in place of
python3 in the abovecommands.
Explaining how to build optional dependencies on a UNIX based system withoutroot access is beyond the scope of this guide.
While you need a C compiler to build CPython, you don’t need anyknowledge of the C language to contribute! Vast areas of CPython arewritten completely in Python: as of this writing, CPython contains slightlymore Python code than C.
If a change is made to Python which relies on some POSIX system-specificfunctionality (such as using a new system call), it is necessary to update the
configure script to test for availability of the functionality.
configure script is generated from
configure.ac using Autoconf.Instead of editing
configure.ac and then run
autoreconf to regenerate
configure and a number of other files (such as
When submitting a patch with changes made to
configure.ac, you should alsoinclude the generated files.
Note that running
autoreconf is not the same as running
autoconf by itself will not regenerate
autoconf and a number of other tools repeatedly as isappropriate.
configure.ac script typically requires a specific version ofAutoconf. At the moment, this reads:
If the system copy of Autoconf does not match this version, you will need toinstall your own copy of Autoconf.
1.6. Troubleshoot the build¶
This section lists some of the common problems that may arise during thecompilation of Python, with proposed solutions.
1.6.1. Avoid recreating auto-generated files¶
Under some circumstances you may encounter Python errors in scripts like
Python/makeopcodetargets.py while running
make.Python auto-generates some of its own code, and a full build from scratch needsto run the auto-generation scripts. However, this makes the Python build requirean already installed Python interpreter; this can also cause version mismatcheswhen trying to build an old (2.x) Python with a new (3.x) Python installed, orvice versa.
To overcome this problem, auto-generated files are also checked into theGit repository. So if you don’t touch the auto-generation scripts, there’sno real need to auto-generate anything.
1.7. Editors and Tools¶
Python is used widely enough that practically all code editors have some formof support for writing Python code. Various coding tools also include Pythonsupport.
For editors and tools which the core developers have felt some special commentis needed for coding in Python, see Additional Resources.
1.8. Directory structure¶
There are several top-level directories in the CPython source tree. Knowing whateach one is meant to hold will help you find where a certain piece offunctionality is implemented. Do realize, though, there are always exceptions toevery rule.
- The official documentation. This is what https://docs.python.org/ uses.See also Building the documentation.
- Contains the EBNF grammar file forPython.
- Contains all interpreter-wide header files.
- The part of the standard library implemented in pure Python.
- Mac-specific code (e.g., using IDLE as an OS X application).
- Things that do not belong elsewhere. Typically this is varying kinds ofdeveloper-specific documentation.
- The part of the standard library (plus some other code) that is implementedin C.
- Code for all built-in types.
- Windows-specific code.
- Build files for the version of MSVC currently used for the Windowsinstallers provided on python.org.
- Code related to the parser. The definition of the AST nodes is also kepthere.
- Source code for C executables, including the main function for theCPython interpreter (in versions prior to Python 3.5, these files arein the Modules directory).
- The code that makes up the core CPython runtime. This includes thecompiler, eval loop and various built-in modules.
- Various tools that are (or have been) used to maintain Python.