Using Makefile in Python with a Virtual Environment

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

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

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

    this is great ! thank you for teaching me

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

    Tye best makefile tutorial I've seen so far. 😊

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

    WOW. Excellent tutorial. Thanks so much.

  • @venky1922
    @venky1922 7 месяцев назад +1

    How to do it in windows

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

    How do you install gmake so that you can use it in a python terminal?

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

      I'm just in a ZSH terminal and install gmake with brew install make. Does that help?

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

      @@EarthlyTech Where is the install to the ZSH terminal? I keep instaling things i dont need. Im on windows.

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

      Ok, im trying to install gmake from the Ubuntu console from Windows 11. When i type "brew install make" it tells me:
      Command 'brew' not found, did you mean:
      command 'qbrew' from deb qbrew (0.4.1-8build1)
      command 'brec' from deb bplay (0.991-10build1)
      Try: sudo apt install

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

      ​@@OchiiDinUmbraa On windows, use chocalately and run `choco install make`
      chocolatey.org/install

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

      @@OchiiDinUmbraa Try running make, it's probably there, else install using Ubuntu package manager. Gmake is a MacOS alias for make

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

    Great tutorial!
    How would you compare this to using a tool like “poetry” for python.
    Seems like that gives you these things for free and other extra things in addition.
    That’s the one I know of, but I bet there are many other options.

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

      I haven't used poetry. I like make because when I switch languages, make works with all of them. But if you are staying in python land always then something more specific to Python could make sense.

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

      @Earthly I’ve only done some minor personal projects with poetry but it does seem nice. I guess the main benefit is that it resolves dependencies and can handle packaging. Otherwise there are pretty nice defaults and commands to help set it up automatically.
      Since packaging and dependencies can be quite fickle if you’re just manually carrying around a “requirements.txt” file, I quite like those features.
      It kind of reminds more of cargo in rust-land. It seems like a very modern approach.
      So I’d recommend checking it out for sure.
      I’ve seen people use conda a lot as well, but I haven’t delved into exactly which features it does well or what the costs versus benefits are.
      (Edit: Your point that developers from other contexts will feel at home with make has a point to it. I’ve seen projects use make to call poetry for that purpose. That kind of seems more complicated than just using one tool in my opinion. Thanks for the interaction!)

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

      Maybe we need to do a future video on poetry? I'll look into it. Cargo is really nice and I do like the nice-defaults, batteries included approach.

    • @ethans-l9461
      @ethans-l9461 Год назад

      Make is useful for setting up Poetry for people not familiar with it. Make is a general state and dependency aware command runner.
      Poetry more than just running virtual environments does recursive dependency management and locking. As well as publication, building, etc.
      Poetry is specialized to Python, Make is generic. Using make to set-up python is quite nice if you’re introducing it to a team though.

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

    Thanks, good infos! FYI, you don't have to make your activate script executable. (Actually, you shouldn't since it's only meant to be sourced.) Oh, and shouldn't setup be .PHONY, too?

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

      yeah, setup should probably be phony as well
      Thanks for watching!