Hi Erick, thank you for leaving a kind comment! If it can be of interest for you, I just configured a pipeline using GitHub actions that does the same: build and test a Python package upon push (including PR validation), then when a release is created in GitHub using tags, it automatically publishes a package to Test PyPi and PyPi. You can find it here in GitHub: github.com/Neoteroi/essentials-openapi
You are right. I have many examples in GitHub, I leave a comment in the description. For new projects I recommend, if possible, to use GitHub Actions. I published other tutorials for them.
Thank You! I recently started again working on video tutorials (in the last years I've been 100% focused on open source contributions in GitHub). Soon I will make an updated version of this tutorial.
Hi! I'm glad that was useful. These days I prepared some new tutorials that describe how I am now handling Python projects in GitHub, and how I use GitHub Workflows / Actions to validate the code, create distribution packages, and publish to PyPi.
@@qzeq_c you're welcome :) if you take a look at my projects in GitHub, you can find examples of YAML files for GitHub Workflows that test, create distribution packages, and deploy packages to PyPi when a release is created. If you need to use Azure DevOps, it would be easy to convert them to Azure DevOps YAML pipelines. For example this one -> github.com/Neoteroi/essentials/blob/main/.github/workflows/build.yml
There is no code for this specific tutorial. However, you can find examples of Azure Pipelines YAML files in my repositories in GitHub, for example here github.com/RobertoPrevato/BlackSheep/blob/master/azure-pipelines.yml - and also examples of GitHub Workflows YAML here github.com/Neoteroi/essentials-openapi (under .github/workflows folder)
Some commands are different in Windows, most of them will be equal. I recommend to take a look at pipelines defined in YAML, for both Azure DevOps and GitHub workflows. In other comments I added above, you can find links to working examples I have in my open source projects.
I am getting this error can you please help (env) C:\Projects>python.exe -m pip install --upgrade pip Requirement already satisfied: pip in c:\projects\env\lib\site-packages (22.2.1) Collecting pip Using cached pip-23.1.2-py3-none-any.whl (2.1 MB) Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 22.2.1 Uninstalling pip-22.2.1: Successfully uninstalled pip-22.2.1 Successfully installed pip-23.1.2 (env) C:\Projects>pip install -e tutorials\mydemo\ Obtaining file:///C:/Projects/tutorials/mydemo Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Preparing editable metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing editable metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [16 lines of output] Traceback (most recent call last): File "C:\Projects\env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in main() File "C:\Projects\env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\Projects\env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 181, in prepare_metadata_for_build_editable return hook(metadata_directory, config_settings) File "C:\Users\kamldha\AppData\Local\Temp\pip-build-env-ne44l8vu\overlay\Lib\site-packages\setuptools\build_meta.py", line 454, in prepare_metadata_for_build_editable return self.prepare_metadata_for_build_wheel( File "C:\Users\kamldha\AppData\Local\Temp\pip-build-env-ne44l8vu\overlay\Lib\site-packages\setuptools\build_meta.py", line 382, in prepare_metadata_for_build_wheel self._bubble_up_info_directory(metadata_directory, ".egg-info") File "C:\Users\kamldha\AppData\Local\Temp\pip-build-env-ne44l8vu\overlay\Lib\site-packages\setuptools\build_meta.py", line 353, in _bubble_up_info_directory info_dir = self._find_info_directory(metadata_directory, suffix) File "C:\Users\kamldha\AppData\Local\Temp\pip-build-env-ne44l8vu\overlay\Lib\site-packages\setuptools\build_meta.py", line 364, in _find_info_directory assert len(candidates) == 1, f"Multiple {suffix} directories found" AssertionError: Multiple .egg-info directories found [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. (env) C:\Projects>
This is so valuable video, which cover full stages.
This is a really nice straightforward presentation
Thank You! Right now I am working on a new web framework for Python, using Cython (like Vibora). Once I finish with it, I will produce more videos.
I really thought it was more complex than that... thank you so much!
Hi Erick, thank you for leaving a kind comment! If it can be of interest for you, I just configured a pipeline using GitHub actions that does the same: build and test a Python package upon push (including PR validation), then when a release is created in GitHub using tags, it automatically publishes a package to Test PyPi and PyPi. You can find it here in GitHub: github.com/Neoteroi/essentials-openapi
Really informative. Thanks a lot.
You did'nt leave a link to your setup
You are right. I have many examples in GitHub, I leave a comment in the description. For new projects I recommend, if possible, to use GitHub Actions. I published other tutorials for them.
Clear and useful!
Thank You! I recently started again working on video tutorials (in the last years I've been 100% focused on open source contributions in GitHub). Soon I will make an updated version of this tutorial.
Very useful, thanks!
Hi! I'm glad that was useful. These days I prepared some new tutorials that describe how I am now handling Python projects in GitHub, and how I use GitHub Workflows / Actions to validate the code, create distribution packages, and publish to PyPi.
which theme you are using for ubuntu?
Hi Anil,
Sorry I missed your comment. It was Numix theme and related icons.
It work in windows 10 ???
Yes
@@RobertoPrevato86 thx
@@qzeq_c you're welcome :) if you take a look at my projects in GitHub, you can find examples of YAML files for GitHub Workflows that test, create distribution packages, and deploy packages to PyPi when a release is created. If you need to use Azure DevOps, it would be easy to convert them to Azure DevOps YAML pipelines. For example this one -> github.com/Neoteroi/essentials/blob/main/.github/workflows/build.yml
where can I find the code for this tutorial thanks in advance
There is no code for this specific tutorial. However, you can find examples of Azure Pipelines YAML files in my repositories in GitHub, for example here github.com/RobertoPrevato/BlackSheep/blob/master/azure-pipelines.yml - and also examples of GitHub Workflows YAML here github.com/Neoteroi/essentials-openapi (under .github/workflows folder)
So that command is going to be same in windows or different??
Some commands are different in Windows, most of them will be equal. I recommend to take a look at pipelines defined in YAML, for both Azure DevOps and GitHub workflows. In other comments I added above, you can find links to working examples I have in my open source projects.
I am getting this error can you please help
(env) C:\Projects>python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in c:\projects\env\lib\site-packages (22.2.1)
Collecting pip
Using cached pip-23.1.2-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.2.1
Uninstalling pip-22.2.1:
Successfully uninstalled pip-22.2.1
Successfully installed pip-23.1.2
(env) C:\Projects>pip install -e tutorials\mydemo\
Obtaining file:///C:/Projects/tutorials/mydemo
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing editable metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Traceback (most recent call last):
File "C:\Projects\env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in
main()
File "C:\Projects\env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Projects\env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 181, in prepare_metadata_for_build_editable
return hook(metadata_directory, config_settings)
File "C:\Users\kamldha\AppData\Local\Temp\pip-build-env-ne44l8vu\overlay\Lib\site-packages\setuptools\build_meta.py", line 454, in prepare_metadata_for_build_editable
return self.prepare_metadata_for_build_wheel(
File "C:\Users\kamldha\AppData\Local\Temp\pip-build-env-ne44l8vu\overlay\Lib\site-packages\setuptools\build_meta.py", line 382, in prepare_metadata_for_build_wheel
self._bubble_up_info_directory(metadata_directory, ".egg-info")
File "C:\Users\kamldha\AppData\Local\Temp\pip-build-env-ne44l8vu\overlay\Lib\site-packages\setuptools\build_meta.py", line 353, in _bubble_up_info_directory
info_dir = self._find_info_directory(metadata_directory, suffix)
File "C:\Users\kamldha\AppData\Local\Temp\pip-build-env-ne44l8vu\overlay\Lib\site-packages\setuptools\build_meta.py", line 364, in _find_info_directory
assert len(candidates) == 1, f"Multiple {suffix} directories found"
AssertionError: Multiple .egg-info directories found
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
(env) C:\Projects>