Skip to content

Update build-create-dist.yml #58

Update build-create-dist.yml

Update build-create-dist.yml #58

Workflow file for this run

name: Version Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # This is important for git history
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Debug environment
run: |
echo "Python version:"
python --version
echo "Pip version:"
pip --version
echo "Setuptools version before upgrade:"
pip show setuptools
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
pip install setuptools_scm
echo "Installed packages:"
pip list
- name: Debug setuptools and setuptools_scm
run: |
echo "Setuptools version after upgrade:"
pip show setuptools
echo "Setuptools_scm version:"
pip show setuptools_scm
- name: Check git tags
run: |
echo "Git tags:"
git tag -l
echo "Latest tag:"
git describe --tags --abbrev=0 || echo "No tags found"
- name: Check package structure
run: |
echo "Package structure:"
find . -type f
- name: Debug setuptools_scm
run: |
echo "Setuptools_scm version:"
pip show setuptools_scm
echo "Setuptools_scm contents:"
python -c "import setuptools_scm; print(dir(setuptools_scm))"
- name: Check setuptools_scm configuration
run: |
echo "setuptools_scm configuration:"
python -c "
import setuptools_scm
try:
from setuptools_scm import get_config
print('get_config is available')
print(get_config())
except ImportError:
print('get_config is not available')
if hasattr(setuptools_scm, 'configuration'):
print('Using setuptools_scm.configuration')
print(setuptools_scm.configuration.Configuration.from_file('.'))
else:
print('Unable to retrieve configuration')
"
- name: Check setuptools_scm version detection
run: |
echo "setuptools_scm detected version:"
python -c "
import setuptools_scm
try:
print(setuptools_scm.get_version())
except Exception as e:
print(f'Error detecting version: {e}')
"
- name: Install package
run: |
pip install -e . --no-deps
echo "Installed packages after installing the package:"
pip list
- name: Check package structure
run: |
echo "Package structure:"
find src/CheckmateSample -type f
echo "Python path:"
python -c "import sys; print('\n'.join(sys.path))"
- name: Check package structure
run: |
echo "Package structure:"
find . -type f
echo "Python path:"
python -c "import sys; print('\n'.join(sys.path))"
- name: Check __init__.py content
run: |
echo "Searching for __init__.py files:"
find . -name "__init__.py"
echo "Contents of __init__.py (if found):"
find . -name "__init__.py" -exec cat {} \; || echo "No __init__.py found"