PhracturedBlue / fava-portfolio-summary

Fava extension to display a portfolio summary
MIT License
24 stars 8 forks source link

fix pip install and update README with package name #3

Closed clsacramento closed 2 years ago

clsacramento commented 2 years ago

I had to make a few changes to setup.py in order to be able to integrate fava-portfolio-summary into my docker image where run beancount/fava. The Dockerfile is as follows:

FROM python:3

# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1

RUN /usr/local/bin/python -m pip install --upgrade pip
RUN /usr/local/bin/python -m pip install --upgrade setuptools
COPY requirements.txt .
RUN python -m pip install -r requirements.txt

WORKDIR /beancount

ENV FAVA_HOST=0.0.0.0
ENV FAVA_PORT=15000
ENV MAIN_FILE=main.beancount

EXPOSE 15000

CMD ["/bin/bash", "-c", "fava $MAIN_FILE"]

And requirements.txt contains:

fava
git+https://github.com/PhracturedBlue/fava-portfolio-summary

The package was being created without the source and template files, so fava was failing to load it. This gets resolved with this proposal.