-
Notifications
You must be signed in to change notification settings - Fork 10
Use setup.cfg with adding python_requires #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a3d7716
Use setup.cfg adding python_requires
75f2c28
Describe version number in setup.cfg instead of version.py
6d4f13d
Fix importing version
4f79b93
Set upper version for numpy
ad47066
Fix for lint error
f2bbfaa
Apply isort
865e9df
Apply feedback review
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,81 +1,3 @@ | ||
| """Treasure Data Driver for Python | ||
| from setuptools import setup | ||
|
|
||
| pytd is a Python interface to Treasure Data data management platform. Unlike | ||
| td-client-python, the official Treasure Data API library for Python, pytd gives | ||
| a direct access to their back-end query and storage engines. The seamless | ||
| connection allows your Python code to read and write a large volume of data in | ||
| a shorter time. It eventually makes your day-to-day data analytics work more | ||
| efficient and productive. | ||
| """ | ||
| import ast | ||
| import re | ||
| from os import path | ||
|
|
||
| with open("pytd/version.py", "rb") as f: | ||
| version_re = re.compile(r"__version__\s+=\s+(.*)") | ||
| VERSION = str( | ||
| ast.literal_eval(version_re.search(f.read().decode("utf-8")).group(1)) | ||
| ) | ||
|
|
||
| with open( | ||
| path.join(path.abspath(path.dirname(__file__)), "README.rst"), encoding="utf-8" | ||
| ) as f: | ||
| long_description = f.read() | ||
|
|
||
| DISTNAME = "pytd" | ||
| DESCRIPTION = "Treasure Data Driver for Python" | ||
| LONG_DESCRIPTION = long_description or __doc__ | ||
| AUTHOR = "Treasure Data" | ||
| AUTHOR_EMAIL = "support@treasure-data.com" | ||
| MAINTAINER = AUTHOR | ||
| MAINTAINER_EMAIL = AUTHOR_EMAIL | ||
| LICENSE = "Apache License 2.0" | ||
| URL = "https://github.com/treasure-data/pytd" | ||
|
|
||
|
|
||
| def setup_package(): | ||
| from setuptools import find_packages, setup | ||
|
|
||
| metadata = dict( | ||
| name=DISTNAME, | ||
| version=VERSION, | ||
| description=DESCRIPTION, | ||
| long_description=LONG_DESCRIPTION, | ||
| long_description_content_type="text/x-rst", | ||
| author=AUTHOR, | ||
| author_email=AUTHOR_EMAIL, | ||
| maintainer=MAINTAINER, | ||
| maintainer_email=MAINTAINER_EMAIL, | ||
| license=LICENSE, | ||
| url=URL, | ||
| classifiers=[ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "Intended Audience :: Developers", | ||
| "License :: OSI Approved :: Apache Software License", | ||
| "Topic :: Database", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.6", | ||
| "Programming Language :: Python :: 3.7", | ||
| "Programming Language :: Python :: 3.8", | ||
| ], | ||
| packages=find_packages(exclude=["*tests*"]), | ||
| install_requires=[ | ||
| "urllib3<1.25,>=1.21.1", | ||
| "presto-python-client>=0.6.0", | ||
| "pandas>=0.25.0", | ||
| "td-client>=1.1.0", | ||
| "pytz>=2018.5", | ||
| ], | ||
| extras_require={ | ||
| "spark": ["td-pyspark>20.10.0", "pyspark>=3.0.0", "pyarrow>=0.12.1"], | ||
| "test": ["pytest"], | ||
| "doc": ["sphinx>=2.2.0", "sphinx_rtd_theme", "numpydoc", "ipython"], | ||
| }, | ||
| ) | ||
|
|
||
| setup(**metadata) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| setup_package() | ||
| setup() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately
version = attr: pytd.__version__doesn't work well while there was improvement for ithttps://stackoverflow.com/questions/58202909/modulenotfounderror-when-using-setup-cfg-and-version-accessed-with-attr
pypa/setuptools#1753