Python: Clean up the capstone-windows stuff with extreme prejudice
diff --git a/bindings/python/BUILDING.txt b/bindings/python/BUILDING.txt
new file mode 100644
index 0000000..157296d
--- /dev/null
+++ b/bindings/python/BUILDING.txt
@@ -0,0 +1,75 @@
+0. This documentation explains how to install Python binding for Capstone
+   from source. If you want to install it from PyPi package (recommended if you
+   are on Window), see README.txt.
+
+1. To install capstone and the python bindings on *nix, run the command below:
+
+		$ sudo make install
+
+   To install capstone for python 3, run the command below:
+   (Note: this requires python3 installed in your machine)
+
+		$ sudo make install3
+
+2. For better Python performance, install cython-based binding with:
+
+		$ sudo make install_cython
+
+	Note that this requires cython installed first. To install cython, see
+	below.
+	
+3. To install cython, you have to ensure that the header files
+   and the static library for Python are installed beforehand.
+
+	E.g. on Ubuntu, do:
+
+		$ sudo apt-get install python-dev
+
+	Depending on if you already have pip or easy_install installed, install
+	cython with either:
+
+		$ sudo pip install cython
+	or:
+		$ sudo easy_install cython
+
+	NOTE: Depending on your distribution you might also be able to
+	      install the required cython version using your repository.
+
+	E.g. on Ubuntu, do:
+	
+		$ sudo apt-get install cython
+
+	However, our cython-based binding requires cython version 0.19 or newer,
+	but sometimes distributions only provide older version. Make sure to
+	verify the current installed version before going into section 2 above.
+	
+	E.g, on Ubuntu, you can verify the current cython version with:
+
+		$ apt-cache policy cython
+
+	Which should at least print version 0.19
+
+4. This directory contains some test code to show how to use Capstone API.
+
+- test_basic.py
+  This code shows the most simple form of API where we only want to get basic
+  information out of disassembled instruction, such as address, mnemonic and
+  operand string.
+
+- test_lite.py
+  Similarly to test_basic.py, but this code shows how to use disasm_lite(), a lighter
+  method to disassemble binary. Unlike disasm() API (used by test_basic.py), which returns
+  CsInsn objects, this API just returns tuples of (address, size, mnemonic, op_str).
+
+  The main reason for using this API is better performance: disasm_lite() is at least
+  20% faster than disasm(). Memory usage is also less. So if you just need basic
+  information out of disassembler, use disasm_lite() instead of disasm().
+
+- test_detail.py:
+  This code shows how to access to architecture-neutral information in disassembled
+  instructions, such as implicit registers read/written, or groups of instructions
+  that this instruction belong to.
+
+- test_<arch>.py
+  These code show how to access architecture-specific information for each
+  architecture.
diff --git a/bindings/python/MANIFEST.in b/bindings/python/MANIFEST.in
index a8834fe..98776c7 100644
--- a/bindings/python/MANIFEST.in
+++ b/bindings/python/MANIFEST.in
@@ -1,3 +1,5 @@
 recursive-include src *
 include LICENSE.TXT
-include README
+include README.txt
+include BUILDING.txt
+include Makefile
diff --git a/bindings/python/PKG-INFO.src b/bindings/python/PKG-INFO.src
deleted file mode 100644
index b093395..0000000
--- a/bindings/python/PKG-INFO.src
+++ /dev/null
@@ -1,14 +0,0 @@
-Metadata-Version: 1.3
-Name: capstone
-Version: 4.0
-Author: Nguyen Anh Quynh
-Author-email: aquynh at gmail com
-Maintainer: Nguyen Anh Quynh
-Maintainer-email: aquynh at gmail com
-Home-page: http://www.capstone-engine.org
-Download-url: www.capstone-engine.org
-Summary: Capstone disassembly framework
-License: BSD
-Description: Capstone is a lightweight multi-platform, multi-architecture disassembly framework with some advanced features. Further information is available at the homepage http://www.capstone-engine.org
-Keywords: disassembly reverse binary arm arm64 aarch64 powerpc ppc m68k mips x86 x86_64 sparc systemz xcore
-Platform: Windows MacOSX Linux NetBSD FreeBSD OpenBSD Solaris Android iOS
diff --git a/bindings/python/PKG-INFO.win b/bindings/python/PKG-INFO.win
deleted file mode 100644
index 8da8ba6..0000000
--- a/bindings/python/PKG-INFO.win
+++ /dev/null
@@ -1,14 +0,0 @@
-Metadata-Version: 1.3
-Name: capstone
-Version: 4.0
-Author: Nguyen Anh Quynh
-Author-email: aquynh at gmail com
-Maintainer: Nguyen Anh Quynh
-Maintainer-email: aquynh at gmail com
-Home-page: http://www.capstone-engine.org
-Download-url: www.capstone-engine.org
-Summary: Capstone disassembly framework with Windows prebuilt core ready inside.
-License: BSD
-Description: Capstone is a lightweight multi-platform, multi-architecture disassembly framework with some advanced features. Further information is available at the homepage http://www.capstone-engine.org
-Keywords: disassembly reverse binary arm arm64 aarch64 powerpc ppc m68k mips x86 x86_64 sparc systemz xcore
-Platform: Windows MacOSX Linux NetBSD FreeBSD OpenBSD Solaris Android iOS
diff --git a/bindings/python/README.TXT b/bindings/python/README.TXT
deleted file mode 100644
index 1fdc36e..0000000
--- a/bindings/python/README.TXT
+++ /dev/null
@@ -1,106 +0,0 @@
-0. This documentation explains how to install Python binding for Capstone
-   from source. If you want to install it from PyPi package, see the below
-   docs instead:
-
-   - README.pypi-src: How to compile the Capstone core & install binding
-     at the same time from PyPi package "capstone"
-
-   - README.pypi-win: How to install binding for Windows from PyPi package
-     "capstone-windows". Note that this package already has prebuilt core
-     inside, so no compilation is needed.
-
-1. To install pure Python binding on *nix, run the command below:
-
-		$ sudo make install
-
-   To install Python3 binding package, run the command below:
-   (Note: this requires python3 installed in your machine)
-
-		$ sudo make install3
-
-2. For better Python performance, install cython-based binding with:
-
-		$ sudo make install_cython
-
-	Note that this requires cython installed in your machine first.
-	To install cython, see section 3 below.
-	
-3. To install cython, you have to ensure that the header files
-   and the static library for Python are installed beforehand.
-
-	E.g. on Ubuntu, do:
-
-		$ sudo apt-get install python-dev
-
-	Depending on if you already have pip or easy_install
-	installed, install cython with either:
-
-		$ sudo pip install cython
-	or:
-		$ sudo easy_install cython
-
-	NOTE: Depending on your distribution you might also be able to
-	      install the required cython version using your repository.
-
-	E.g. on Ubuntu, do:
-	
-		$ sudo apt-get install cython
-
-	However, our cython-based binding requires cython version 0.19 or newer,
-	but sometimes distributions only provide older version. Make sure to
-	verify the current installed version before going into section 2 above.
-	
-	E.g, on Ubuntu, you can verify the current cython version with:
-
-		$ apt-cache policy cython
-
-	Which should at least print version 0.19
-
-
-This directory contains some test code to show how to use Capstone API.
-
-- test_basic.py
-  This code shows the most simple form of API where we only want to get basic
-  information out of disassembled instruction, such as address, mnemonic and
-  operand string.
-
-- test_lite.py
-  Similarly to test_basic.py, but this code shows how to use disasm_lite(), a lighter
-  method to disassemble binary. Unlike disasm() API (used by test_basic.py), which returns
-  CsInsn objects, this API just returns tuples of (address, size, mnemonic, op_str).
-
-  The main reason for using this API is better performance: disasm_lite() is at least
-  20% faster than disasm(). Memory usage is also less. So if you just need basic
-  information out of disassembler, use disasm_lite() instead of disasm().
-
-- test_detail.py:
-  This code shows how to access to architecture-neutral information in disassembled
-  instructions, such as implicit registers read/written, or groups of instructions
-  that this instruction belong to.
-
-- test_<arch>.py
-  These code show how to access architecture-specific information for each
-  architecture.
-
-
-2. To install Python binding on Windows:
-
-Recommended method:
-
-	Use the Python module installer for 32/64 bit Windows from:
-
-		http://www.capstone-engine.org/download.html
-
-
-Manual method:
-
-	If the module installer fails to locate your Python install, or if you have
-	additional Python installs (e.g. Anaconda / virtualenv), run the following
-	command in command prompt:
-
-		C:\> C:\location_to_python\python.exe setup.py install
-
-	Next, copy capstone.dll from the 'Core engine for Windows' package available
-	on the same Capstone download page and paste it in the path:
-
-		C:\location_to_python\Lib\site-packages\capstone\
diff --git a/bindings/python/README.pypi-win b/bindings/python/README.pypi-win
deleted file mode 100644
index f37f9f7..0000000
--- a/bindings/python/README.pypi-win
+++ /dev/null
@@ -1,52 +0,0 @@
-NOTE: This package includes prebuilt Windows core of Capstone, so no external
-Capstone library is needed.
-
-On Windows, download this PyPi package and run "python setup.py install" from
-"Command Prompt" is all you need to install it.
-
-If you want to compile everything from source code instead, use the
-PyPi package "capstone" instead.
-
-    https://pypi.python.org/pypi/capstone
-
---------------------------------------------------------------------------------
-
-Capstone is a disassembly framework with the target of becoming the ultimate
-disasm engine for binary analysis and reversing in the security community.
-
-Created by Nguyen Anh Quynh, then developed and maintained by a small community,
-Capstone offers some unparalleled features:
-
-- Support multiple hardware architectures: ARM, ARM64 (ARMv8), Mips, PPC, Sparc,
-  SystemZ, XCore and X86 (including X86_64).
-
-- Having clean/simple/lightweight/intuitive architecture-neutral API.
-
-- Provide details on disassembled instruction (called “decomposer” by others).
-
-- Provide semantics of the disassembled instruction, such as list of implicit
-  registers read & written.
-
-- Implemented in pure C language, with lightweight wrappers for C++, C#, Go,
-  Java, NodeJS, Ocaml, Python, Ruby & Vala ready (available in main code,
-  or provided externally by the community).
-
-- Native support for all popular platforms: Windows, Mac OSX, iOS, Android,
-  Linux, *BSD, Solaris, etc.
-
-- Thread-safe by design.
-
-- Special support for embedding into firmware or OS kernel.
-
-- High performance & suitable for malware analysis (capable of handling various
-  X86 malware tricks).
-
-- Distributed under the open source BSD license.
-
-Further information is available at http://www.capstone-engine.org
-
-
-[License]
-
-This project is released under the BSD license. If you redistribute the binary
-or source code of Capstone, please attach file LICENSE.TXT with your products.
diff --git a/bindings/python/README.pypi-src b/bindings/python/README.txt
similarity index 65%
rename from bindings/python/README.pypi-src
rename to bindings/python/README.txt
index d8350b5..32a6a6e 100644
--- a/bindings/python/README.pypi-src
+++ b/bindings/python/README.txt
@@ -1,16 +1,17 @@
-NOTE: This PyPi package "capstone" includes source code of the core of Capstone.
-So installing this would also compile the core with C compiler (either "gcc" or
-"msvc" on Windows).
+To install capstone, you should run `pip install capstone`.
 
-On Windows, MSVC needs compiler environmental setup, you would need to either
-run "pip install capstone" or "python setup.py install" from "Developer Command
-Prompt".
+If you would like to build capstone with just the source distribution, without
+pip, just run `python setup.py install` in the same folder as this text file.
 
-For Windows, if you do not want to compile the core, try the "capstone-windows"
-package instead, which already includes the prebuilt "capstone.dll" inside.
+In order to use this source distribution, you will need an environment that can
+compile C code. On linux, this is usually easy, but on windows, this involves
+installing Visual Studio and using the "Developer Command Prompt" to perform the
+installation. See BUILDING.txt for more information.
 
-
-    https://pypi.python.org/pypi/capstone-windows
+If you don't want to build your own copy of capstone, you can use a precompiled
+binary distribution frm PyPI. Saying `pip install capstone` should automatically
+obtain an appropriate copy for your system. If it does not, please inform
+<andrew@andrewdutcher.com> - they will fix this, probably.
 
 --------------------------------------------------------------------------------
 
diff --git a/bindings/python/prebuilt/win32/.gitignore b/bindings/python/prebuilt/win32/.gitignore
deleted file mode 100644
index 46d0c85..0000000
--- a/bindings/python/prebuilt/win32/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-capstone.dll
-# Except this file
-!.gitignore
diff --git a/bindings/python/prebuilt/win64/.gitignore b/bindings/python/prebuilt/win64/.gitignore
deleted file mode 100644
index 46d0c85..0000000
--- a/bindings/python/prebuilt/win64/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-capstone.dll
-# Except this file
-!.gitignore
diff --git a/bindings/python/setup.py b/bindings/python/setup.py
index 9ab6c7b..45dbd3e 100755
--- a/bindings/python/setup.py
+++ b/bindings/python/setup.py
@@ -156,17 +156,18 @@
     print "Proper 'develop' support unavailable."
 
 if 'bdist_wheel' in sys.argv and '--plat-name' not in sys.argv:
-    sys.argv.append('--plat-name')
+    idx = sys.argv.index('bdist_wheel') + 1
+    sys.argv.insert(idx, '--plat-name')
     name = get_platform()
     if 'linux' in name:
         # linux_* platform tags are disallowed because the python ecosystem is fubar
         # linux builds should be built in the centos 5 vm for maximum compatibility
         # see https://github.com/pypa/manylinux
         # see also https://github.com/angr/angr-dev/blob/master/bdist.sh
-        sys.argv.append('manylinux1_' + platform.machine())
+        sys.argv.insert(idx + 1, 'manylinux1_' + platform.machine())
     else:
         # https://www.python.org/dev/peps/pep-0425/
-        sys.argv.append(name.replace('.', '_').replace('-', '_'))
+        sys.argv.insert(idx + 1, name.replace('.', '_').replace('-', '_'))
 
 setup(
     provides=['capstone'],