-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate version with setuptools_scm and migrate to pyproject.toml (#…
…4799) * Generate version with setuptools_scm and migrate to pyproject.toml Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * add tag rege Signed-off-by: Kevin Su <[email protected]> * update makefile Signed-off-by: Kevin Su <[email protected]> * update flyteidl-release.yml Signed-off-by: Kevin Su <[email protected]> * package-data Signed-off-by: Kevin Su <[email protected]> --------- Signed-off-by: Kevin Su <[email protected]>
- Loading branch information
Showing
4 changed files
with
79 additions
and
55 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
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools_scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "flyteidl" | ||
dynamic = ["version"] | ||
authors = [{ name = "Flyte Contributors", email = "[email protected]" }] | ||
description = "IDL for Flyte Platform" | ||
license = { text = "Apache-2.0" } | ||
readme = { file = "README.md", content-type = "text/markdown" } | ||
requires-python = ">=3.8,<3.13" | ||
dependencies = [ | ||
'googleapis-common-protos', | ||
'protoc_gen_swagger', | ||
'protobuf>=4.21.1,<5.0.0' | ||
# Packages in here should rarely be pinned. This is because these | ||
# packages (at the specified version) are required for project | ||
# consuming this library. By pinning to a specific version you are the | ||
# number of projects that can consume this or forcing them to | ||
# upgrade/downgrade any dependencies pinned here in their project. | ||
# | ||
# Generally packages listed here are pinned to a major version range. | ||
# | ||
# e.g. | ||
# Python FooBar package for foobaring | ||
# pyfoobar>=1.0, <2.0 | ||
# | ||
# This will allow for any consuming projects to use this library as | ||
# long as they have a version of pyfoobar equal to or greater than 1.x | ||
# and less than 2.x installed. | ||
] | ||
classifiers = [ | ||
"Intended Audience :: Science/Research", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"Topic :: Software Development", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: Software Development :: Libraries :: Python Modules" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/flyteorg/flyte/tree/master/flyteidl" | ||
|
||
[tool.setuptools_scm] | ||
root = "../" | ||
tag_regex = '^(?:[\w-]+/)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$' | ||
|
||
# https://github.com/pypa/setuptools/issues/3136 describes an extension to | ||
# setuptools that would involve a simpler way to specify this, but while | ||
# that does not happen we have to package the pyi files manually like so: | ||
[tool.setuptools.package-data] | ||
flyteidl = ["*.pyi", "**/*pyi"] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["gen/pb_python/*"] | ||
exclude = [ | ||
"_templates", | ||
"tmp", | ||
"boilerplate", | ||
"clients", | ||
"docs", | ||
"jsonschema", | ||
"protos", | ||
"scripts", | ||
"gen/pb-cpp", | ||
"gen/pb-go", | ||
"gen/pb-java", | ||
"gen/pb-js", | ||
"gen/pb-rust", | ||
] |
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,45 +1,3 @@ | ||
from setuptools import setup, find_packages | ||
|
||
__version__ = "0.0.0+develop" | ||
|
||
setup( | ||
name='flyteidl', | ||
version=__version__, | ||
description='IDL for Flyte Platform', | ||
url='https://github.com/flyteorg/flyte/tree/master/flyteidl', | ||
long_description=open("README.md", encoding="utf-8").read(), | ||
long_description_content_type="text/markdown", | ||
maintainer='FlyteOrg', | ||
maintainer_email='[email protected]', | ||
packages=find_packages('gen/pb_python'), | ||
package_dir={'': 'gen/pb_python'}, | ||
# https://github.com/pypa/setuptools/issues/3136 describes an extension to | ||
# setuptools that would involve a simpler way to specify this, but while | ||
# that does not happen we have to package the pyi files manually like so: | ||
package_data={'flyteidl': ["*.pyi", "**/*.pyi"]}, | ||
dependency_links=[], | ||
install_requires=[ | ||
'googleapis-common-protos', | ||
'protoc_gen_swagger', | ||
'protobuf>=4.21.1,<5.0.0', | ||
# Packages in here should rarely be pinned. This is because these | ||
# packages (at the specified version) are required for project | ||
# consuming this library. By pinning to a specific version you are the | ||
# number of projects that can consume this or forcing them to | ||
# upgrade/downgrade any dependencies pinned here in their project. | ||
# | ||
# Generally packages listed here are pinned to a major version range. | ||
# | ||
# e.g. | ||
# Python FooBar package for foobaring | ||
# pyfoobar>=1.0, <2.0 | ||
# | ||
# This will allow for any consuming projects to use this library as | ||
# long as they have a version of pyfoobar equal to or greater than 1.x | ||
# and less than 2.x installed. | ||
], | ||
extras_require={ | ||
':python_version=="2.7"': ['typing>=3.6'], # allow typehinting PY2 | ||
}, | ||
license='Apache-2.0', | ||
) | ||
setup() |