Using Makefile in Python with a Virtual Environment

แชร์
ฝัง
  • เผยแพร่เมื่อ 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!