genkit 0.1.4__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
genkit-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: genkit
3
+ Version: 0.3.0
4
+ Summary: Genkit requires Python >= 3.10. This placeholder release exists only to give older interpreters a clear upgrade message.
5
+ Home-page: https://genkit.dev
6
+ Author: Google
7
+ License: Apache-2.0
8
+ Requires-Python: <3.10
9
+ Description-Content-Type: text/plain
10
+ Dynamic: author
11
+ Dynamic: description
12
+ Dynamic: description-content-type
13
+ Dynamic: home-page
14
+ Dynamic: license
15
+ Dynamic: requires-python
16
+ Dynamic: summary
17
+
18
+ Genkit is an open-source framework for building AI-powered applications, from Google. It requires Python 3.10 or newer. This placeholder release exists only so that installs on older Python versions fail with a clear message instead of a resolver error. See https://genkit.dev/docs/python/get-started/
genkit-0.3.0/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # genkit Python-floor shim
2
+
3
+ A one-time PyPI release (`genkit 0.3.0`, sdist only) that turns the
4
+ old-Python install experience from a silent wrong install into a clear
5
+ upgrade message.
6
+
7
+ ## Why it exists
8
+
9
+ Genkit requires Python >= 3.10, but macOS ships Python 3.9 at
10
+ `/usr/bin/python3`. On that interpreter, `pip install genkit` used to
11
+ resolve `genkit 0.2.0` — an unrelated package from before the PyPI name
12
+ was transferred to this project ("random data like phone numbers") —
13
+ because those pre-transfer releases (0.1.0–0.2.0) declare
14
+ `Requires-Python: >=3.6` and pip silently falls back to them.
15
+
16
+ ## How it works
17
+
18
+ - The shim declares `Requires-Python: <3.10`, so Python >= 3.10 can
19
+ never select it. Fresh installs on current Pythons keep getting the
20
+ real latest genkit.
21
+ - On Python <= 3.9, version 0.3.0 outranks the pre-transfer 0.2.0, pip
22
+ commits to it, and `setup.py` fails the **install phase** with a boxed
23
+ message: the 3.10 requirement plus uv / Homebrew / python.org
24
+ instructions. The failure must stay out of the metadata phase
25
+ (`egg_info`/`dist_info`/`sdist` succeed on purpose): old pip treats a
26
+ metadata failure as a discardable candidate and backtracks to the
27
+ pre-transfer 0.2.0 with exit 0 — the silent wrong install again.
28
+ - It is published as an **sdist only**. A wheel would install cleanly as
29
+ an empty package on old Pythons — exactly the silent failure this
30
+ prevents. Keep the `--sdist` flag in `publish_python.yml`.
31
+ - The boxed message is for `pip install genkit` and
32
+ `uv pip install genkit`. A second name on the same line
33
+ (`pip install genkit genkit-google-genai`) fails in the resolver on
34
+ that plugin's `Requires-Python: >=3.10` and never reaches this
35
+ `setup.py`.
36
+
37
+ The version never changes: 0.3.0 was never published (the history goes
38
+ 0.3.0.dev2 -> 0.3.1), and it sits above 0.2.0 (the last pre-transfer
39
+ release) and below 0.3.1 (the first real genkit release).
40
+ `skip-existing: true` in the publish workflow makes re-publishing it on
41
+ every release tag a no-op after the first upload.
42
+
43
+ This directory is intentionally not a uv workspace member: it shares the
44
+ `genkit` project name with `packages/genkit`, and workspace project
45
+ names must be unique.
46
+
47
+ ## Verifying
48
+
49
+ ```bash
50
+ # Build (any Python >= 3.10):
51
+ uv build --sdist py/floor-shim --out-dir /tmp/shim-dist
52
+
53
+ # Old Python shows the boxed message (expected: install fails with instructions):
54
+ /usr/bin/python3 -m venv /tmp/v39 && /tmp/v39/bin/pip install --no-index \
55
+ --find-links /tmp/shim-dist genkit
56
+
57
+ # The load-bearing case — a competing old release is visible (stands in for
58
+ # the pre-transfer 0.2.0). Expected: exit != 0, boxed message, and NOTHING
59
+ # installed. If genkit 0.2.0 gets installed instead, the shim is failing at
60
+ # the metadata phase and old pip is backtracking past it:
61
+ mkdir -p /tmp/sq && printf 'from setuptools import setup\nsetup(name="genkit", version="0.2.0", python_requires=">=3.6")\n' > /tmp/sq/setup.py
62
+ uv build --wheel /tmp/sq --out-dir /tmp/shim-dist
63
+ /usr/bin/python3 -m venv /tmp/v39b && /tmp/v39b/bin/pip install --no-index \
64
+ --find-links /tmp/shim-dist genkit; /tmp/v39b/bin/pip show genkit
65
+
66
+ # Current Python ignores the shim even when visible (expected: installs real genkit):
67
+ python3.13 -m venv /tmp/v313 && /tmp/v313/bin/pip install \
68
+ --find-links /tmp/shim-dist genkit
69
+ ```
70
+
71
+ ## Required companion step: yank the pre-transfer releases
72
+
73
+ Yank 0.1.0, 0.1.3, 0.1.4, and 0.2.0 on pypi.org **before or together
74
+ with** the first shim publish. This is a precondition, not optional
75
+ cleanup: those releases are the fallback candidates old pip reaches for
76
+ whenever it decides to skip the shim, and yanking is what makes the
77
+ wrong package unreachable for every resolver generation. After the
78
+ yank, pinned installs (`genkit==0.2.0`) are the only way to reach them.
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: genkit
3
+ Version: 0.3.0
4
+ Summary: Genkit requires Python >= 3.10. This placeholder release exists only to give older interpreters a clear upgrade message.
5
+ Home-page: https://genkit.dev
6
+ Author: Google
7
+ License: Apache-2.0
8
+ Requires-Python: <3.10
9
+ Description-Content-Type: text/plain
10
+ Dynamic: author
11
+ Dynamic: description
12
+ Dynamic: description-content-type
13
+ Dynamic: home-page
14
+ Dynamic: license
15
+ Dynamic: requires-python
16
+ Dynamic: summary
17
+
18
+ Genkit is an open-source framework for building AI-powered applications, from Google. It requires Python 3.10 or newer. This placeholder release exists only so that installs on older Python versions fail with a clear message instead of a resolver error. See https://genkit.dev/docs/python/get-started/
@@ -1,9 +1,5 @@
1
- LICENSE
2
1
  README.md
3
2
  setup.py
4
- genkit/__init__.py
5
- genkit/country_code.py
6
- genkit/genkit.py
7
3
  genkit.egg-info/PKG-INFO
8
4
  genkit.egg-info/SOURCES.txt
9
5
  genkit.egg-info/dependency_links.txt
@@ -0,0 +1 @@
1
+
genkit-0.3.0/setup.py ADDED
@@ -0,0 +1,149 @@
1
+ # Copyright 2026 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+ # SPDX-License-Identifier: Apache-2.0
16
+
17
+ """Python-floor shim for the `genkit` package on PyPI.
18
+
19
+ Real genkit releases require Python >= 3.10. On older interpreters
20
+ (like the Python 3.9 that macOS ships), pip either resolves nothing or
21
+ resolves an unrelated pre-transfer package that holds low version
22
+ numbers on PyPI. This sdist declares `Requires-Python: <3.10`, so
23
+ current interpreters can never select it, while old interpreters pick
24
+ it as their best candidate and get a clear how-to-upgrade message
25
+ instead of a resolver error.
26
+
27
+ Publish as sdist ONLY (`uv build --sdist`). A wheel would install
28
+ "successfully" as an empty package on old Pythons, which is the silent
29
+ failure this shim exists to prevent. Version 0.3.0 was never published
30
+ (the history goes 0.3.0.dev2 -> 0.3.1), so the shim fills that hole:
31
+ above the pre-transfer squatter releases (<= 0.2.0), below every real
32
+ genkit release (>= 0.3.1). It never needs to change.
33
+ """
34
+
35
+ import sys
36
+
37
+ MIN_PYTHON = (3, 10)
38
+
39
+ # Fail at the build/install phase, not the metadata phase: old pip (e.g. the
40
+ # 21.2.4 bundled with macOS system Python) treats a metadata-build failure as
41
+ # a discardable candidate and backtracks to the pre-transfer 0.2.0 — the
42
+ # exact silent wrong-install this shim exists to prevent. An install-phase
43
+ # failure is fatal on every pip generation, so the user actually sees the
44
+ # message and nothing gets installed.
45
+ _METADATA_ONLY_COMMANDS = {'egg_info', 'dist_info', 'sdist'}
46
+
47
+
48
+ # Annotations here must stay plain builtin names: this function runs on
49
+ # whatever ancient interpreter the user has (the shim's whole audience), and
50
+ # subscripted generics like `tuple[int, ...]` evaluate at def time and raise
51
+ # TypeError before 3.9 — the user would get a traceback instead of the
52
+ # upgrade message.
53
+ def _format_error_message(min_ver: tuple, cur_ver: tuple) -> str:
54
+ min_str = '.'.join(map(str, min_ver))
55
+ cur_str = '.'.join(map(str, cur_ver[:3]))
56
+
57
+ if sys.platform == 'win32':
58
+ platform_hint = f'Windows requires Python {min_str}+ to run Genkit.'
59
+ recipes = (
60
+ ' # Option 1 (Recommended): uv (manages Python versions automatically)\n'
61
+ ' powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"\n'
62
+ ' uv init && uv add genkit\n'
63
+ '\n'
64
+ f' # Option 2: Download Python (>= {min_str}) from https://www.python.org/downloads/\n'
65
+ ' python -m venv .venv && .venv\\Scripts\\pip install genkit'
66
+ )
67
+ elif sys.platform == 'darwin':
68
+ platform_hint = (
69
+ 'macOS ships an older Python at /usr/bin/python3.\n'
70
+ f'To use Genkit, install Python {min_str}+ using one of the options below:'
71
+ )
72
+ recipes = (
73
+ ' # Option 1 (Recommended): uv (manages Python for you)\n'
74
+ ' curl -LsSf https://astral.sh/uv/install.sh | sh\n'
75
+ ' uv init && uv add genkit\n'
76
+ '\n'
77
+ ' # Option 2: Homebrew\n'
78
+ ' brew install python\n'
79
+ ' python3 -m venv .venv && source .venv/bin/activate\n'
80
+ ' pip install genkit\n'
81
+ '\n'
82
+ ' # Option 3: Download installer from https://www.python.org/downloads/'
83
+ )
84
+ else:
85
+ platform_hint = (
86
+ f'Your system Python is older than the required Python {min_str}+.\n'
87
+ f'To use Genkit, install Python {min_str}+ using one of the options below:'
88
+ )
89
+ recipes = (
90
+ ' # Option 1 (Recommended): uv (standalone, no root required)\n'
91
+ ' curl -LsSf https://astral.sh/uv/install.sh | sh\n'
92
+ ' uv init && uv add genkit\n'
93
+ '\n'
94
+ ' # Option 2: System Package Manager\n'
95
+ ' sudo apt update && sudo apt install python3 python3-venv\n'
96
+ ' python3 -m venv .venv && source .venv/bin/activate\n'
97
+ ' pip install genkit\n'
98
+ '\n'
99
+ ' # Option 3: Download installer from https://www.python.org/downloads/'
100
+ )
101
+
102
+ return (
103
+ '\n'
104
+ '========================================================================\n'
105
+ f'Genkit requires Python {min_str}+, but you are running Python {cur_str}.\n'
106
+ '\n'
107
+ f'{platform_hint}\n'
108
+ '\n'
109
+ f'{recipes}\n'
110
+ '\n'
111
+ 'Docs: https://genkit.dev/docs/python/get-started/\n'
112
+ '========================================================================\n'
113
+ )
114
+
115
+
116
+ if sys.version_info < MIN_PYTHON and not _METADATA_ONLY_COMMANDS.intersection(sys.argv[1:]):
117
+ sys.exit(_format_error_message(MIN_PYTHON, sys.version_info))
118
+
119
+ # The shim must never ship as a wheel: wheels run no code at install time,
120
+ # so on an old Python a wheel would install "successfully" as an empty
121
+ # package — the exact silent failure this shim exists to prevent. Refusing
122
+ # here (after the version guard, so old interpreters still get the upgrade
123
+ # box) makes sdist-only self-enforcing instead of workflow-flag-dependent.
124
+ if 'bdist_wheel' in sys.argv[1:]:
125
+ sys.exit('The genkit floor shim is sdist-only; refusing to build a wheel. See py/floor-shim/README.md.')
126
+
127
+ from setuptools import setup # noqa: E402
128
+
129
+ setup(
130
+ name='genkit',
131
+ version='0.3.0',
132
+ description=(
133
+ 'Genkit requires Python >= 3.10. This placeholder release exists only '
134
+ 'to give older interpreters a clear upgrade message.'
135
+ ),
136
+ long_description=(
137
+ 'Genkit is an open-source framework for building AI-powered '
138
+ 'applications, from Google. It requires Python 3.10 or newer. '
139
+ 'This placeholder release exists only so that installs on older '
140
+ 'Python versions fail with a clear message instead of a resolver '
141
+ 'error. See https://genkit.dev/docs/python/get-started/'
142
+ ),
143
+ long_description_content_type='text/plain',
144
+ url='https://genkit.dev',
145
+ author='Google',
146
+ license='Apache-2.0',
147
+ python_requires='<3.10',
148
+ py_modules=[],
149
+ )
genkit-0.1.4/LICENSE DELETED
@@ -1,25 +0,0 @@
1
- **5. `LICENSE`**
2
-
3
- ```markdown
4
- MIT License
5
-
6
- Copyright (c) [2024] [Suhail]
7
-
8
- Permission is hereby granted, free of charge, to any person obtaining a copy
9
- of this software and associated documentation files (the "Software"), to deal
10
- in the Software without restriction, including without limitation the rights
11
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- copies of the Software, and to permit persons to whom the Software is
13
- furnished to do so, subject to the following conditions:
14
-
15
- The above copyright notice and this permission notice shall be included in all
16
- copies or substantial portions of the Software.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
- SOFTWARE.
25
- ```