Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated setup.py --version to python3 -m setuptools_scm. #12428

Merged
merged 3 commits into from
Jun 30, 2022

Conversation

djyasin
Copy link
Member

@djyasin djyasin commented Jun 24, 2022

SUMMARY

Invoking setup.py directly is deprecated #12375

ISSUE TYPE
  • Bug Fix PR
COMPONENT NAME
  • API
AWX VERSION
awx: 21.0.1

@djyasin
Copy link
Member Author

djyasin commented Jun 24, 2022

This is a PR in progress. Since these changes will touch multiple areas and require additional dependencies, we have decided to incrementally make commits as we update each term. This PR specifically updates: setup.py --version

@djyasin
Copy link
Member Author

djyasin commented Jun 24, 2022

Updated setup.py --version in this WIP PR. Given the scope of this change, we have opted to incrementally commit updates here as we find replacements for the deprecated terminology.

@shanemcd shanemcd force-pushed the updating_setuppy branch 2 times, most recently from 137a2de to d5a440a Compare June 27, 2022 17:04
Copy link
Member

@Zokormazo Zokormazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makefile code allows to modify the python interpreter using $PYTHON , but the rest of the changes are hardcoding python3 . Should we allow to modify the interpreter in playbooks and Dockerfiles?

@shanemcd
Copy link
Member

@Zokormazo The Makefile is used within the Dockerfile to create /var/lib/awx/venv, so we know it will always get created with the intended version. For the build playbook - I think python3 is fine there because it's only grabbing the version. I dont see a reason to tie this to a particular python version. For the Dockerfile - I think it's fine because we know within the context of EL9 that will always be 3.9.


def version_file():
current_dir = os.path.dirname(os.path.abspath(__file__))
version_file = os.path.join(current_dir, '..', 'VERSION')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What lays down this version file and what's the expectation for using the development environment? Will it have a version file or not?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VERSION file is only expected to be present downstream. The development environment should use setuptools_scm.get_version(), which will get the version based on the most recent git tag.

@shanemcd shanemcd merged commit a0d5f1f into ansible:devel Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants