Skip to content

Commit f709db7

Browse files
committed
rollback to filt
1 parent a3c8465 commit f709db7

File tree

4 files changed

+40
-13
lines changed

4 files changed

+40
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ parts/
2323
sdist/
2424
var/
2525
wheels/
26+
*.egg-info/
2627
.installed.cfg
2728
*.egg
2829
ads_latest.zip

MANIFEST.in

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
include THIRD_PARTY_LICENSES.txt
2-
include LICENSE.txt
3-
include README.md
1+
# Manifest.in file used by setuptools, which we are not using anymore.
2+
# Do not add anything to this file, unless revert back to setuptools, which is not recommended. See why here:
3+
# https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html.
4+
5+
# Instead flit-core used as backend to build ADS - see section [build-system] in pyproject.toml.
6+
# For flit-core we can specify files and folders, which needs to be included or excluded in build using
7+
# [tool.flit.sdist] section of pyproject.toml. See: https://flit.pypa.io/en/latest/pyproject_toml.html#sdist-section
8+
# If build-system library will change, make changed to list of included/excluded to build files accordingly
9+
# as it will be suggested by new build-system library.

pyproject.toml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44
## Check README-development.md and Makefile for instruction how to install or build ADS locally.
55

66
[build-system]
7-
requires = ["setuptools>=65", "wheel"]
8-
build-backend = "setuptools.build_meta"
7+
# PEP 517 – A build-system independent format for source trees - https://peps.python.org/pep-0517/
8+
# Till recently flit-core library was suggested by pip, so we used it. In future, cosider to change to
9+
# other, if better, build-backend library.
10+
requires = [
11+
"flit-core >=3.8,<4",
12+
] # should specify <4, so won’t be impacted by changes in the next major version
13+
build-backend = "flit_core.buildapi"
914

1015

1116
[project]
@@ -15,8 +20,8 @@ build-backend = "setuptools.build_meta"
1520
# PEP 518 – Specifying Minimum Build System Requirements for Python Projects https://peps.python.org/pep-0518/
1621

1722
# Required
18-
name = "oracle_ads" # the install (PyPI) name
19-
version = "2.13.9rc0"
23+
name = "oracle_ads" # the install (PyPI) name; name for local build in [tool.flit.module] section below
24+
version = "2.13.9rc1"
2025

2126
# Optional
2227
description = "Oracle Accelerated Data Science SDK"
@@ -44,6 +49,7 @@ keywords = [
4449
classifiers = [
4550
"Development Status :: 5 - Production/Stable",
4651
"Intended Audience :: Developers",
52+
"License :: OSI Approved :: Universal Permissive License (UPL)",
4753
"Operating System :: OS Independent",
4854
"Programming Language :: Python :: 3.9",
4955
"Programming Language :: Python :: 3.10",
@@ -55,7 +61,7 @@ classifiers = [
5561
# In dependencies se "<library>; platform_machine == 'aarch64'" to specify ARM underlying platform
5662
# Copied from install_requires list in setup.py, setup.py got removed in favor of this config file
5763
dependencies = [
58-
"PyYAML>=6.0.1", # pyyaml 5.4 is broken with cython 3
64+
"PyYAML>=6", # pyyaml 5.4 is broken with cython 3
5965
"asteval>=0.9.25",
6066
"cerberus>=1.3.4",
6167
"cloudpickle>=1.6.0",
@@ -250,12 +256,13 @@ testsuite = [
250256
[project.scripts]
251257
ads = "ads.cli:cli"
252258

253-
[tool.setuptools.packages.find]
254-
where = ["."]
255-
include = ["ads"]
259+
[tool.flit.module]
260+
name = "ads" # name for local build and import, see https://flit.pypa.io/en/latest/pyproject_toml.html#module-section
256261

257-
[tool.setuptools.package-data]
258-
"ads" = ["THIRD_PARTY_LICENSES.txt"]
262+
[tool.flit.sdist]
263+
# By default `ads` folder and `LICENSE.txt` file included in sdist. Folders `docs` and `tests` are excluded, as weel as other project files
264+
# Use this section to include/exclude files and folders. See doc: https://flit.pypa.io/en/latest/pyproject_toml.html#sdist-section
265+
include = ["THIRD_PARTY_LICENSES.txt"]
259266

260267
# Configuring Ruff (https://docs.astral.sh/ruff/configuration/)
261268
[tool.ruff]

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8; -*-
3+
4+
# Copyright (c) 2020, 2025 Oracle and/or its affiliates.
5+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
6+
7+
### File setup.py obsolete and must not be used. Please update pyproject.toml instead.
8+
### See detailed explanation why here:
9+
### https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html.
10+
# PEP 621 – Storing project metadata in pyproject.toml - https://peps.python.org/pep-0621/
11+
# PEP 518 – Specifying Minimum Build System Requirements for Python Projects https://peps.python.org/pep-0518/
12+
# PEP 508 – Dependency specification for Python Software Packages - https://peps.python.org/pep-0508/
13+
# PEP 517 – A build-system independent format for source trees - https://peps.python.org/pep-0517/

0 commit comments

Comments
 (0)