-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #490 from python-rope/bageljrkhanofemus-rope-pypro…
…ject-toml Migrate from setup.py to pyproject.toml
- Loading branch information
Showing
3 changed files
with
75 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,75 @@ | ||
[tool.black] | ||
[project] | ||
name = 'rope' | ||
description = 'a python refactoring library...' | ||
readme = 'README.rst' | ||
requires-python = '>=3.6' | ||
classifiers = [ | ||
'Development Status :: 4 - Beta', | ||
'Operating System :: OS Independent', | ||
'Environment :: X11 Applications', | ||
'Environment :: Win32 (MS Windows)', | ||
'Environment :: MacOS X', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)', | ||
'Natural Language :: English', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Topic :: Software Development', | ||
] | ||
dynamic = ['version'] | ||
dependencies = ['pytoolconfig > 1.0.0'] | ||
|
||
[[project.authors]] | ||
name = 'Ali Gholami Rudi' | ||
email = 'aligrudi@users.sourceforge.net' | ||
|
||
[project.license] | ||
text = 'LGPL-3.0-or-later' | ||
|
||
[project.urls] | ||
Source = 'https://github.com/python-rope/rope' | ||
|
||
target-version = ['py35', 'py36', 'py37', 'py38', 'py39'] | ||
[project.optional-dependencies] | ||
dev = [ | ||
'pytest>=7.0.1', | ||
'pytest-timeout>=2.1.0', | ||
'build>=0.7.0', | ||
'pytoolconfig[doc]' | ||
] | ||
[tool.setuptools] | ||
packages = [ | ||
'rope', | ||
'rope.base', | ||
'rope.base.oi', | ||
'rope.base.oi.type_hinting', | ||
'rope.base.oi.type_hinting.providers', | ||
'rope.base.oi.type_hinting.resolvers', | ||
'rope.base.utils', | ||
'rope.contrib', | ||
'rope.refactor', | ||
'rope.refactor.importutils', | ||
] | ||
[tool.setuptools.dynamic.version] | ||
attr = 'rope.VERSION' | ||
|
||
[tool.black] | ||
target-version = [ | ||
'py36', | ||
'py37', | ||
'py38', | ||
'py39', | ||
] | ||
include = 'rope/.*\.pyi?$' | ||
force-exclude = 'ropetest' | ||
|
||
[build-system] | ||
requires = [ | ||
'setuptools', | ||
'setuptools-scm', | ||
] | ||
build-backend = 'setuptools.build_meta' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,3 @@ | ||
import io | ||
import os.path | ||
from setuptools import setup | ||
|
||
try: | ||
from setuptools import setup | ||
except ImportError: | ||
from distutils.core import setup | ||
|
||
|
||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Operating System :: OS Independent", | ||
"Environment :: X11 Applications", | ||
"Environment :: Win32 (MS Windows)", | ||
"Environment :: MacOS X", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", | ||
"Natural Language :: English", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Topic :: Software Development", | ||
] | ||
|
||
|
||
def get_long_description(): | ||
lines = io.open("README.rst", "r", encoding="utf8").read().splitlines(False) | ||
end = lines.index("Maintainers") | ||
return "\n" + "\n".join(lines[:end]) + "\n" | ||
|
||
|
||
def get_version(): | ||
version = None | ||
with io.open( | ||
os.path.join(os.path.dirname(__file__), "rope", "__init__.py") | ||
) as inif: | ||
for line in inif: | ||
if line.startswith("VERSION"): | ||
version = line.split("=")[1].strip(" \t\"'\n") | ||
break | ||
return version | ||
|
||
|
||
setup( | ||
name="rope", | ||
version=get_version(), | ||
description="a python refactoring library...", | ||
long_description=get_long_description(), | ||
long_description_content_type="text/x-rst", | ||
author="Ali Gholami Rudi", | ||
author_email="aligrudi@users.sourceforge.net", | ||
url="https://github.com/python-rope/rope", | ||
packages=[ | ||
"rope", | ||
"rope.base", | ||
"rope.base.oi", | ||
"rope.base.oi.type_hinting", | ||
"rope.base.oi.type_hinting.providers", | ||
"rope.base.oi.type_hinting.resolvers", | ||
"rope.base.utils", | ||
"rope.contrib", | ||
"rope.contrib.autoimport", | ||
"rope.refactor", | ||
"rope.refactor.importutils", | ||
], | ||
license="LGPL-3.0-or-later", | ||
classifiers=classifiers, | ||
extras_require={ | ||
"doc": [ | ||
"pytoolconfig[doc]", | ||
"sphinx>=4.5.0", | ||
"sphinx-autodoc-typehints>=1.18.1", | ||
"sphinx-rtd-theme>=1.0.0", | ||
], | ||
"dev": [ | ||
"build", | ||
"pytest", | ||
"pytest-timeout", | ||
], | ||
}, | ||
python_requires=">=3.7", | ||
) | ||
setup() |