Repository: youtube-dl
Issue: Build the Windows exe with Python 3.6
Labels: request

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.07.05**
### Before submitting an _issue_ make sure you have:
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [ ] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [x] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---
### Description of your _issue_, suggested solution and other information

Some Python bugs (#8132, #7951) is fixed upstream and included in new Python versions. However, the 3.4 branch of Python now [receives only security fixes](https://docs.python.org/devguide/devcycle.html#summary). As a result, Windows users have to install the latest Python 2.7 or 3.5 and optionally build their own `youtube-dl.exe`.

py2exe is dead and [gets no new fixes since Oct 2014](https://sourceforge.net/p/py2exe/svn/765/log/?path=/trunk/py2exe-3). Here I suggest to move to another bundling tool.
1. [PyInstaller](https://github.com/pyinstaller/pyinstaller)
   I got an error when installing PyInstaller - one of its dependencies is broken (erocarrera/pefile#105) Need to install the latest git-master of pefile. After installation everything looks fine (see test results later)
2. cx_Freeze
   There are still [commits last month](https://bitbucket.org/anthony_tuininga/cx_freeze/commits/all) but [no releases since Dec 2014](http://cx-freeze.sourceforge.net/). Sounds less promising so I didn't test it.

---
### Testing results for PyInstaller

```
G:\Projects\youtube-dl>C:\Users\yen\AppData\Local\Programs\Python\Python35-32\Scripts\pyinstaller.exeScripts\pyinstaller.exe youtube_dl\__main__.py --onefile
G:\Projects\youtube-dl>C:

C:\Users\yen>G:\Projects\youtube-dl\dist\__main__.exe -v test:xuite
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'test:xuite']
[debug] Encodings: locale cp950, fs mbcs, out cp950, pref cp950
[debug] youtube-dl version 2016.07.05
[debug] Python version 3.5.2 - Windows-7-6.1.7601-SP1
[debug] exe versions: none
[debug] Proxy map: {}
[TestURL] Test URL: http://vlog.xuite.net/play/RGkzc1ZULTM4NjA5MTQuZmx2
[Xuite] RGkzc1ZULTM4NjA5MTQuZmx2: Downloading webpage
[Xuite] flv config: Downloading XML
[debug] Invoking downloader on 'http://5.mms.vlog.xuite.net/video/d90029/RGkzc1ZULTM4NjA5MTQuZmx2?k=83d2bffb6e41c13bef881851cf3433e6&q=mp3'
[download] Destination: 孤單南半球-歐德陽-3860914.mp3
[download] 100% of 3.77MiB in 00:00

C:\Users\yen>G:\Projects\youtube-dl\dist\__main__.exe -v test:youtube
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'test:youtube']
[debug] Encodings: locale cp950, fs mbcs, out cp950, pref cp950
[debug] youtube-dl version 2016.07.05
[debug] Python version 3.5.2 - Windows-7-6.1.7601-SP1
[debug] exe versions: none
[debug] Proxy map: {}
[TestURL] Test URL: http://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9
[youtube] BaW_jenozKc: Downloading webpage
[youtube] BaW_jenozKc: Downloading video info webpage
[youtube] BaW_jenozKc: Extracting video information
[youtube] BaW_jenozKc: Downloading MPD manifest
[debug] Invoking downloader on 'https://r5---sn-5njj-u2xe.googlevideo.com/videoplayback?mt=1467713206&sparams=cnr%2Cdur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&mv=m&ms=au&ip=140.112.230.216&requiressl=yes&mm=31&mn=sn-5njj-u2xe&id=o-AEkgVjFdJPzfmRjB0uKvDsKWLa2XSwYZ4jGFftQ_ja9N&pl=16&itag=22&initcwndbps=6036250&ratebypass=yes&expire=1467735204&fexp=9406174%2C9416126%2C9416891%2C9422596%2C9428398%2C9431012%2C9433096%2C9433223%2C9433946%2C9435526%2C9435876%2C9436965%2C9437066%2C9437553%2C9438327%2C9439652&ipbits=0&dur=9.891&sver=3&mime=video%2Fmp4&key=yt6&signature=2317B697B0D035F741776D0B4EE0E4CB6E773CBD.274C21B2BC22BC647D657CD9DD9FC5312266BF07&upn=3cWCeTQL_SY&source=youtube&cnr=14&lmt=1387961818043059'
[download] Destination: youtube-dl test video ''_ä↭𝕐-BaW_jenozKc.mp4
[download] 100% of 1.53MiB in 00:00

C:\Users\yen>
```