import os
import re
from setuptools import find_packages
from setuptools import setup
import io

here = os.path.abspath(os.path.dirname(__file__))
try:
    # obtain version string from __init__.py
    # Read ASCII file with builtin open() so __version__ is str in Python 2 and 3
    with open(os.path.join(here, 'pytorch_ext', '__init__.py'), 'r') as f:
        init_py = f.read()
    version = re.search('__version__ = "(.*)"', init_py).groups()[0]
except Exception:
    version = ''
try:
    # obtain long description from README and CHANGES
    with io.open(os.path.join(here, 'README.rst'), 'r', encoding='utf-8') as f:
        README = f.read()
    with io.open(os.path.join(here, 'CHANGES.rst'), 'r', encoding='utf-8') as f:
        CHANGES = f.read()
except IOError:
    README = CHANGES = ''

install_requires = []
tests_require    = []

setup(
    name="Pytorch_Ext",
    version=version,
    description="Extention to Pytorch, including new layers, utility functions, etc. ",
    long_description="\n\n".join([README, CHANGES]),
    classifiers=[
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3.5",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
        ],
    keywords="",
    author="David Leon (Dawei Leng)",
    author_email="daweileng@outlook.com",
    url="https://github.com/david-leon/Pytorch_Ext",
    license="MIT",
    packages=find_packages(),
    include_package_data=False,
    zip_safe=False,
    )

@@ -92,196 +92,143 @@
 t io
-%0A%0Ahere = os.path.abspath(os.path.dirname(__file__))%0Atry:%0A    # obtain version string from __init__.py%0A    # Read ASCII file with builtin open() so __version__ is str in Python 2 and 3%0A    
+, shutil%0Afrom distutils.extension import Extension%0A%0Acmdclass = %7B%7D%0Aext_modules = %5B%5D%0A%0Ahere = os.path.abspath(os.path.dirname(__file__))%0A%0A
 with
@@ -298,20 +298,16 @@
  f:%0A    
-  
-  
 init_py 
@@ -317,20 +317,16 @@
 .read()%0A
-    
 version 
@@ -386,106 +386,9 @@
 %5B0%5D%0A
-except Exception:%0A    version = ''%0Atry:%0A    # obtain long description from README and CHANGES%0A    
+%0A
 with
@@ -423,19 +423,18 @@
 'README.
-rst
+md
 '), 'r',
@@ -454,28 +454,24 @@
 f-8') as f:%0A
-    
     README =
@@ -483,158 +483,8 @@
 ad()
-%0A    with io.open(os.path.join(here, 'CHANGES.rst'), 'r', encoding='utf-8') as f:%0A        CHANGES = f.read()%0Aexcept IOError:%0A    README = CHANGES = ''
 %0A%0Ain
@@ -691,38 +691,65 @@
 ion=
-%22%5Cn%5Cn%22.join(%5BREADME, CHANGES%5D)
+README,%0A    long_description_content_type=%22text/markdown%22
 ,%0A  
@@ -897,18 +897,90 @@
 :: M
-IT License
+ozilla Public License 2.0 (MPL 2.0)%22,%0A        %22Programming Language :: Python :: 3
 %22,%0A 
@@ -1027,16 +1027,59 @@
 : 3.5%22,%0A
+%09%09%22Programming Language :: Python :: 3.6%22,%0A
         
@@ -1165,16 +1165,37 @@
 ywords=%22
+DL framework, Pytorch
 %22,%0A    a
@@ -1269,16 +1269,59 @@
 k.com%22,%0A
+    license=%22Mozilla Public License v2.0%22,%0A
     url=
@@ -1369,27 +1369,8 @@
 t%22,%0A
-    license=%22MIT%22,%0A
     
@@ -1420,20 +1420,19 @@
 ge_data=
-Fals
+Tru
 e,%0A    z
@@ -1446,14 +1446,179 @@
 =False,%0A
+    # install_requires=install_requires,%0A    # extras_require=%7B%0A    #     'testing': tests_require,%0A    #     %7D,%0A    cmdclass=cmdclass,%0A    ext_modules=ext_modules,%0A
     )%0A

update setup.py