Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 35 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,62 @@ jobs:
baseVersion: 1.0.0
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Verify FURY_PUSH_TOKEN is set
env:
FURY_PUSH_TOKEN: ${{ secrets.FURY_PUSH_TOKEN }}
run: |
if [ -z "$FURY_PUSH_TOKEN" ]; then
echo "::error::FURY_PUSH_TOKEN secret is not set on this repo."
echo "Add it with: gh secret set FURY_PUSH_TOKEN --repo mapped/botbuilder-python"
exit 1
fi

- name: publish botbuilder-integration-aiohttp-forked
run: |
echo version: $packageVersion
echo "version: $packageVersion"
python setup.py sdist
curl -F package=@./dist/botbuilder-integration-aiohttp-forked-$packageVersion.tar.gz https://${{ secrets.FURY_PUSH_TOKEN }}@push.fury.io/mapped/
# setuptools >=69 normalizes sdist filenames (PEP 625), so glob rather than
# hard-coding the hyphenated form we used to write.
sdist=$(ls -1 dist/*.tar.gz | head -n1)
echo "publishing $sdist"
curl --fail-with-body -F "package=@${sdist}" "https://${FURY_PUSH_TOKEN}@push.fury.io/mapped/"
env:
packageVersion: ${{ steps.vtl.outputs.ver_semVerNoMeta}}
FURY_PUSH_TOKEN: ${{ secrets.FURY_PUSH_TOKEN }}
working-directory: ./libraries/botbuilder-integration-aiohttp

- name: publish botframework-connector-forked
run: |
echo version: $packageVersion
echo "version: $packageVersion"
python setup.py sdist
curl -F package=@./dist/botframework-connector-forked-$packageVersion.tar.gz https://${{ secrets.FURY_PUSH_TOKEN }}@push.fury.io/mapped/
sdist=$(ls -1 dist/*.tar.gz | head -n1)
echo "publishing $sdist"
curl --fail-with-body -F "package=@${sdist}" "https://${FURY_PUSH_TOKEN}@push.fury.io/mapped/"
env:
packageVersion: ${{ steps.vtl.outputs.ver_semVerNoMeta}}
FURY_PUSH_TOKEN: ${{ secrets.FURY_PUSH_TOKEN }}
working-directory: ./libraries/botframework-connector

- name: publish botframework-streaming-forked
run: |
echo version: $packageVersion
echo "version: $packageVersion"
python setup.py sdist
curl -F package=@./dist/botframework-streaming-forked-$packageVersion.tar.gz https://${{ secrets.FURY_PUSH_TOKEN }}@push.fury.io/mapped/
sdist=$(ls -1 dist/*.tar.gz | head -n1)
echo "publishing $sdist"
curl --fail-with-body -F "package=@${sdist}" "https://${FURY_PUSH_TOKEN}@push.fury.io/mapped/"
env:
packageVersion: ${{ steps.vtl.outputs.ver_semVerNoMeta}}
FURY_PUSH_TOKEN: ${{ secrets.FURY_PUSH_TOKEN }}
working-directory: ./libraries/botframework-streaming

- name: publish botbuilder-core-forked
run: |
echo version: $packageVersion
echo "version: $packageVersion"
python setup.py sdist
curl -F package=@./dist/botbuilder-core-forked-$packageVersion.tar.gz https://${{ secrets.FURY_PUSH_TOKEN }}@push.fury.io/mapped/
sdist=$(ls -1 dist/*.tar.gz | head -n1)
echo "publishing $sdist"
curl --fail-with-body -F "package=@${sdist}" "https://${FURY_PUSH_TOKEN}@push.fury.io/mapped/"
env:
packageVersion: ${{ steps.vtl.outputs.ver_semVerNoMeta}}
FURY_PUSH_TOKEN: ${{ secrets.FURY_PUSH_TOKEN }}
working-directory: ./libraries/botbuilder-core
17 changes: 3 additions & 14 deletions libraries/botbuilder-core/botbuilder/core/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,10 @@

import os

def _get_version():
if "packageVersion" in os.environ:
return os.environ["packageVersion"]
# When a build tool (e.g. uv) re-runs setup.py without packageVersion set,
# read the version from PKG-INFO so the reported version matches the sdist.
pkg_info = os.path.join(os.path.dirname(__file__), "..", "..", "PKG-INFO")
try:
import email.parser
with open(pkg_info, encoding="utf-8") as f:
return email.parser.Parser().parse(f)["Version"]
except Exception:
return "4.15.0"

__title__ = "botbuilder-core"
__version__ = _get_version()
__version__ = (
os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"
)
__uri__ = "https://www.github.com/Microsoft/botbuilder-python"
__author__ = "Microsoft"
__description__ = "Microsoft Bot Framework Bot Builder"
Expand Down
23 changes: 21 additions & 2 deletions libraries/botbuilder-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,26 @@
import os
from setuptools import setup

VERSION = os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"

def _resolve_version():
# CI sets packageVersion when building the release sdist.
if "packageVersion" in os.environ:
return os.environ["packageVersion"]
# When uv/pip rebuilds an already-published sdist, packageVersion is not set,
# but PKG-INFO from the sdist is present next to setup.py; read Version from it
# so the rebuilt wheel's metadata matches the sdist's index metadata (uv >=0.4
# rejects mismatches with 'Package metadata version X does not match given Y').
pkg_info = os.path.join(os.path.dirname(os.path.abspath(__file__)), "PKG-INFO")
if os.path.isfile(pkg_info):
import email.parser
with open(pkg_info, encoding="utf-8") as f:
version = email.parser.Parser().parse(f).get("Version")
if version:
return version
return "4.15.0"


VERSION = _resolve_version()
REQUIRES = [
"botbuilder-schema==4.14.0",
"botframework-connector-forked>=1.0.11",
Expand All @@ -24,7 +43,7 @@

setup(
name=package_info["__title__"] + "-forked",
version=package_info["__version__"],
version=VERSION,
url=package_info["__uri__"],
author=package_info["__author__"],
description=package_info["__description__"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@

import os

def _get_version():
if "packageVersion" in os.environ:
return os.environ["packageVersion"]
# botbuilder/integration/aiohttp/about.py → 3 levels up to sdist root
pkg_info = os.path.join(os.path.dirname(__file__), "..", "..", "..", "PKG-INFO")
try:
import email.parser
with open(pkg_info, encoding="utf-8") as f:
return email.parser.Parser().parse(f)["Version"]
except Exception:
return "4.15.0"

__title__ = "botbuilder-integration-aiohttp"
__version__ = _get_version()
__version__ = (
os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"
)
__uri__ = "https://www.github.com/Microsoft/botbuilder-python"
__author__ = "Microsoft"
__description__ = "Microsoft Bot Framework Bot Builder"
Expand Down
23 changes: 21 additions & 2 deletions libraries/botbuilder-integration-aiohttp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,26 @@
import os
from setuptools import setup

VERSION = os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"

def _resolve_version():
# CI sets packageVersion when building the release sdist.
if "packageVersion" in os.environ:
return os.environ["packageVersion"]
# When uv/pip rebuilds an already-published sdist, packageVersion is not set,
# but PKG-INFO from the sdist is present next to setup.py; read Version from it
# so the rebuilt wheel's metadata matches the sdist's index metadata (uv >=0.4
# rejects mismatches with 'Package metadata version X does not match given Y').
pkg_info = os.path.join(os.path.dirname(os.path.abspath(__file__)), "PKG-INFO")
if os.path.isfile(pkg_info):
import email.parser
with open(pkg_info, encoding="utf-8") as f:
version = email.parser.Parser().parse(f).get("Version")
if version:
return version
return "4.15.0"


VERSION = _resolve_version()
REQUIRES = [
"botbuilder-schema==4.14.0",
"botframework-connector-forked>=1.0.10",
Expand All @@ -25,7 +44,7 @@

setup(
name=package_info["__title__"] + "-forked",
version=package_info["__version__"],
version=VERSION,
url=package_info["__uri__"],
author=package_info["__author__"],
description=package_info["__description__"],
Expand Down
15 changes: 3 additions & 12 deletions libraries/botframework-connector/botframework/connector/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,10 @@

import os

def _get_version():
if "packageVersion" in os.environ:
return os.environ["packageVersion"]
pkg_info = os.path.join(os.path.dirname(__file__), "..", "..", "PKG-INFO")
try:
import email.parser
with open(pkg_info, encoding="utf-8") as f:
return email.parser.Parser().parse(f)["Version"]
except Exception:
return "4.15.0"

__title__ = "botframework-connector"
__version__ = _get_version()
__version__ = (
os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"
)
__uri__ = "https://www.github.com/Microsoft/botbuilder-python"
__author__ = "Microsoft"
__description__ = "Microsoft Bot Framework Bot Builder"
Expand Down
21 changes: 20 additions & 1 deletion libraries/botframework-connector/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@
import os
from setuptools import setup


def _resolve_version():
# CI sets packageVersion when building the release sdist.
if "packageVersion" in os.environ:
return os.environ["packageVersion"]
# When uv/pip rebuilds an already-published sdist, packageVersion is not set,
# but PKG-INFO from the sdist is present next to setup.py; read Version from it
# so the rebuilt wheel's metadata matches the sdist's index metadata (uv >=0.4
# rejects mismatches with 'Package metadata version X does not match given Y').
pkg_info = os.path.join(os.path.dirname(os.path.abspath(__file__)), "PKG-INFO")
if os.path.isfile(pkg_info):
import email.parser
with open(pkg_info, encoding="utf-8") as f:
version = email.parser.Parser().parse(f).get("Version")
if version:
return version
return "4.15.0"


NAME = "botframework-connector"
VERSION = os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"
VERSION = _resolve_version()
REQUIRES = [
"msrest==0.6.*",
"requests>=2.23.0,<3.0.0",
Expand Down
15 changes: 3 additions & 12 deletions libraries/botframework-streaming/botframework/streaming/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,10 @@

import os

def _get_version():
if "packageVersion" in os.environ:
return os.environ["packageVersion"]
pkg_info = os.path.join(os.path.dirname(__file__), "..", "..", "PKG-INFO")
try:
import email.parser
with open(pkg_info, encoding="utf-8") as f:
return email.parser.Parser().parse(f)["Version"]
except Exception:
return "4.15.0"

__title__ = "botframework-streaming"
__version__ = _get_version()
__version__ = (
os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"
)
__uri__ = "https://www.github.com/Microsoft/botbuilder-python"
__author__ = "Microsoft"
__description__ = "Microsoft Bot Framework Bot Builder"
Expand Down
23 changes: 21 additions & 2 deletions libraries/botframework-streaming/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,26 @@
import os
from setuptools import setup

#VERSION = os.environ["packageVersion"] if "packageVersion" in os.environ else "4.15.0"

def _resolve_version():
# CI sets packageVersion when building the release sdist.
if "packageVersion" in os.environ:
return os.environ["packageVersion"]
# When uv/pip rebuilds an already-published sdist, packageVersion is not set,
# but PKG-INFO from the sdist is present next to setup.py; read Version from it
# so the rebuilt wheel's metadata matches the sdist's index metadata (uv >=0.4
# rejects mismatches with 'Package metadata version X does not match given Y').
pkg_info = os.path.join(os.path.dirname(os.path.abspath(__file__)), "PKG-INFO")
if os.path.isfile(pkg_info):
import email.parser
with open(pkg_info, encoding="utf-8") as f:
version = email.parser.Parser().parse(f).get("Version")
if version:
return version
return "4.15.0"


VERSION = _resolve_version()
REQUIRES = [
"botbuilder-schema==4.14.0",
"botframework-connector-forked>=1.0.15",
Expand All @@ -22,7 +41,7 @@

setup(
name=package_info["__title__"] + "-forked",
version=package_info["__version__"],
version=VERSION,
url=package_info["__uri__"],
author=package_info["__author__"],
description=package_info["__description__"],
Expand Down