damnever / pigar

:coffee: A tool to generate requirements.txt for Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)

Home Page:https://damnever.github.io/pigar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

proposal: use magic marks in comments to help make better decisions

damnever opened this issue · comments

Just some random thoughts, something like this:

import a # pigar: requirements="package-a"

soup = BeautifulSoup(html, 'lxml') # pigar: requirements="lxml"

 # pigar: requirements="foo","bar == 1.0"
EXTRA_PACKAGES = ["foo", "bar"]

Maybe this is too much since pigar is not a package management tool, ref: https://github.com/damnever/pigar#faq

I think a command line option or a separate configuration file is acceptable.

Related issue: #32, #103