GithubHelp home page GithubHelp logo

Comments (2)

mnot avatar mnot commented on May 20, 2024 1

I love the simplicity of the one-line requirements.txt - didn't know you could do that.

However, I'm also aiming to reduce the total number of files in the repo, and I already have a separate Makefile.pyproject (see https://github.com/mnot/pyproject-tmpl). So, I'm inclined to take the other approach, and hide it in that file.

Many thanks!

from makefile.venv.

sio avatar sio commented on May 20, 2024

I like the general idea but I don't see a way to implement this in Makefile.venv that would be nicer and cleaner than using requirements.txt. Do you have any suggestions?

I've done some experiments with your redbot repo:


Experiment 1. Installing optional dependencies via Makefile recipe

venv: | $(VENV)/$(MARKER)-dev
$(VENV)/$(MARKER)-dev: $(VENV)/$(MARKER)
	$(VENV)/pip install -e .[dev]
	touch $@

Experiment 2. Installing optional dependencies via requirements.txt

# requirements.txt
.[dev]

In both of these experiments I've updated Makefile.venv to the latest version - it handles pyproject.toml in a more seamless way. I've also deleted existing requirements.txt contents. This probably makes my experimental branches rather unusable for actual redbot develoment as it appears some tools were listed in requrements.txt that are not mentioned in [dev] dependency list.

Both approaches produce the same venv with all optional [dev] dependencies installed. I find a single line requirements.txt much cleaner and easier to understand than a complex recipe in Experiment 1, wouldn't you agree?

from makefile.venv.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.