Creating Python Packages - Tutorial

Поделиться
HTML-код
  • Опубликовано: 29 янв 2025

Комментарии • 24

  • @tangducbao7309
    @tangducbao7309 2 года назад

    This is so valuable video, which cover full stages.

  • @MonicasYT
    @MonicasYT 6 лет назад +3

    This is a really nice straightforward presentation

    • @RobertoPrevato86
      @RobertoPrevato86  6 лет назад +1

      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.

  • @erickballesteros4531
    @erickballesteros4531 4 года назад +1

    I really thought it was more complex than that... thank you so much!

    • @RobertoPrevato86
      @RobertoPrevato86  4 года назад +3

      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

  • @binaypradhan1668
    @binaypradhan1668 5 лет назад +6

    Really informative. Thanks a lot.

  • @phetolomojela3014
    @phetolomojela3014 2 года назад +1

    You did'nt leave a link to your setup

    • @RobertoPrevato86
      @RobertoPrevato86  2 года назад

      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.

  • @ghrasko
    @ghrasko 5 лет назад +2

    Clear and useful!

    • @RobertoPrevato86
      @RobertoPrevato86  3 года назад

      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.

  • @martinv1123
    @martinv1123 4 года назад +1

    Very useful, thanks!

    • @RobertoPrevato86
      @RobertoPrevato86  2 года назад

      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.

  • @Anilkumar533
    @Anilkumar533 3 года назад

    which theme you are using for ubuntu?

    • @RobertoPrevato86
      @RobertoPrevato86  Год назад

      Hi Anil,
      Sorry I missed your comment. It was Numix theme and related icons.

  • @qzeq_c
    @qzeq_c 3 года назад +1

    It work in windows 10 ???

    • @RobertoPrevato86
      @RobertoPrevato86  3 года назад +1

      Yes

    • @qzeq_c
      @qzeq_c 3 года назад +2

      @@RobertoPrevato86 thx

    • @RobertoPrevato86
      @RobertoPrevato86  3 года назад

      @@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

  • @siddharthakancharla8389
    @siddharthakancharla8389 4 года назад

    where can I find the code for this tutorial thanks in advance

    • @RobertoPrevato86
      @RobertoPrevato86  4 года назад +1

      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)

  • @amolkale1158
    @amolkale1158 4 года назад

    So that command is going to be same in windows or different??

    • @RobertoPrevato86
      @RobertoPrevato86  4 года назад

      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.

  • @kdhairyavan
    @kdhairyavan Год назад

    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>