0

Apparently there's a long-standing bug in Flask-Bootstrap that where quick_form omits the label for radio button fields. I found a fix for it. First I applied the fix to my local pip installation of Flask-Bootstrap. Finding that worked, I forked the repository, applied to fix to my fork, executed pip to uninstall Flask-Bootstrap and install my fork.

But pip freeze lists Flask-Bootstrap and has nothing about my fork of it.

I need requirements.txt to use my fork instead of the original version. How can I do this? I know that I can add a line in requirements.txt to indicate installation from a repository. But I'd rather avoid doing this manually every time I install a new Flask module.

Is there a way to automate the process of including the properly line in requirements.txt?

Chuck
  • 4,662
  • 2
  • 33
  • 55
  • `pip install git+https://#egg=Flask-Bootstrap` then `pip freeze` should list your repository for the `Flask-Bootstrap` module. – AChampion Mar 20 '19 at 00:36
  • It doesn't. To double-check I uninstalled my version of `flask-bootstrap`, installed my version, ran `pip freeze` and this line was included: `Flask-Bootstrap==3.3.7.2.dev1`. If I manually edit `requirements.txt`, run `pip install -r requirements.txt` and then run `pip freeze`, it shows it at that point. Perhaps that will have to suffice. – Chuck Mar 20 '19 at 00:39

1 Answers1

1

Performing these steps fixed the problem. First uninstall Flask-Bootstrap with pip uninstall flask-bootstrap. Then manually edit requirements.txt to include this line:

-e git+https://github.com/chivalry/flask-bootstrap.git

Finally, run pip install -r requirements.txt and pip freeze > requirements.txt. The last command will edit requirements.txt to include the commit ID and #egg name of the precise version used.

-e git+https://github.com/chivalry/flask-bootstrap.git@c28095521664dea05f2adbf5e01fe1a36392ab6e#egg=Flask_Bootstrap
Chuck
  • 4,662
  • 2
  • 33
  • 55