11#!/usr/bin/env python
22
3- from setuptools import setup , Command , Extension
4- from setuptools .command .build_ext import build_ext
53import distutils
6- from distutils .command import build
7- from subprocess import check_output , check_call
4+ from distutils .command .build import build as _build
5+ from setuptools .command .develop import develop as _develop
6+ from wheel .bdist_wheel import bdist_wheel as _bdist_wheel
7+ from setuptools import Distribution
8+ from setuptools import setup , Command
89
9- import sys , os
10+ import os
1011
1112# Disable SourceLink during the build until it can read repo-format v1, #1613
1213os .environ ["EnableSourceControlManagerQueries" ] = "false"
1314
15+
1416class DotnetLib :
1517 def __init__ (self , name , path , ** kwargs ):
1618 self .name = name
@@ -91,13 +93,6 @@ def run(self):
9193
9294
9395# Add build_dotnet to the build tasks:
94- from distutils .command .build import build as _build
95- from setuptools .command .develop import develop as _develop
96- from wheel .bdist_wheel import bdist_wheel as _bdist_wheel
97- from setuptools import Distribution
98- import setuptools
99-
100-
10196class build (_build ):
10297 sub_commands = _build .sub_commands + [("build_dotnet" , None )]
10398
@@ -129,10 +124,6 @@ def finalize_options(self):
129124 "bdist_wheel" : bdist_wheel ,
130125}
131126
132-
133- with open ("README.rst" , "r" ) as f :
134- long_description = f .read ()
135-
136127dotnet_libs = [
137128 DotnetLib (
138129 "python-runtime" ,
@@ -143,36 +134,8 @@ def finalize_options(self):
143134
144135setup (
145136 cmdclass = cmdclass ,
146- name = "pythonnet" ,
147- version = "3.0.0.dev1" ,
148- description = ".Net and Mono integration for Python" ,
149- url = "https://pythonnet.github.io/" ,
150137 project_urls = {
151138 "Source" : "https://github.com/pythonnet/pythonnet" ,
152139 },
153- license = "MIT" ,
154- author = "The Contributors of the Python.NET Project" ,
155- author_email = "pythonnet@python.org" ,
156- packages = ["pythonnet" , "pythonnet.find_libpython" ],
157- install_requires = ["clr_loader >= 0.1.7" ],
158- long_description = long_description ,
159- long_description_content_type = "text/x-rst" ,
160- py_modules = ["clr" ],
161140 dotnet_libs = dotnet_libs ,
162- classifiers = [
163- "Development Status :: 5 - Production/Stable" ,
164- "Intended Audience :: Developers" ,
165- "License :: OSI Approved :: MIT License" ,
166- "Programming Language :: C#" ,
167- "Programming Language :: Python :: 3" ,
168- "Programming Language :: Python :: 3.6" ,
169- "Programming Language :: Python :: 3.7" ,
170- "Programming Language :: Python :: 3.8" ,
171- "Programming Language :: Python :: 3.9" ,
172- "Programming Language :: Python :: 3.10" ,
173- "Operating System :: Microsoft :: Windows" ,
174- "Operating System :: POSIX :: Linux" ,
175- "Operating System :: MacOS :: MacOS X" ,
176- ],
177- zip_safe = False ,
178141)
0 commit comments