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

add step to install requirements file for publish pypi workflow #302

Merged

Conversation

ngoan1608
Copy link
Collaborator

Hi Thomas,

I updated workflow to install requirements file in this PR.

Thank you,
Ngoan

@ngoan1608 ngoan1608 added the bug Something isn't working label May 14, 2024
@test-fullautomation
Copy link
Owner

Hi @ngoan1608 ,
why is this not working when setup.py knows the new dependency?
Thank you,
Thomas

@test-fullautomation test-fullautomation merged commit c04bdcb into develop May 14, 2024
2 of 3 checks passed
@ngoan1608
Copy link
Collaborator Author

ngoan1608 commented May 15, 2024

Hi @ngoan1608 , why is this not working when setup.py knows the new dependency? Thank you, Thomas

Hi @test-fullautomation ,

The install_requires configuration in setup.py (referred to as INSTALLREQUIRES in the repository_config.json file) is used to define the dependencies of this package during installation via pip. This ensures that all required dependencies are installed when the package is installed.
However, this configuration is not used for building the package.

The requirements.txt file defines the packages which required for installing (building) this packages manually (for contributor).

Typically, only the following packages are required for building the package for publishing to pypi using setuptools in our infrastructure:

  • build, twine and wheel for building and verifying package.
  • GenPackageDoc and PythonExtensionsCollection for generating PDF document (extended setup)

In the extended setup, the VERSION info is retrieved from version.py, which is located in the package folder during the build. Therefore:

  • If there is no implementation in __init__.py within package folder, no additional packages are required. E.g GenPackageDoc repo
  • If there is any implementation or import inside __init__.py, the dependencies (or at least the imported/called packages) should be installed before building. This is because __init__.py is executed as soon as the extended setup retrieves that VERSION information (as is the case in this repository).

Please let me know if this explanation is unclear.
Additionally, I noticed that pydotdictis not listed as a dependency for this package in the repository_config.json file.
New PR have been created to update that missing.

Thank you,

@test-fullautomation
Copy link
Owner

Hi Ngoan,
thank you for the clarification.
I hope I will not complain in some months again :-)
Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.12.0 bug Something isn't working
Projects
Development

Successfully merging this pull request may close these issues.

2 participants