mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-18 08:53:42 +00:00
Read install_requires from requirements.txt, and make things work without matplotlib installed
This commit is contained in:
parent
130eb7fe97
commit
7f9e4b80c1
2 changed files with 10 additions and 8 deletions
|
|
@ -15,11 +15,15 @@ from copy import deepcopy
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
logging.basicConfig()
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
from matplotlib import pyplot as plt
|
try:
|
||||||
from matplotlib.dates import MonthLocator, num2date
|
from matplotlib import pyplot as plt
|
||||||
from matplotlib.ticker import FuncFormatter
|
from matplotlib.dates import MonthLocator, num2date
|
||||||
|
from matplotlib.ticker import FuncFormatter
|
||||||
|
except ImportError:
|
||||||
|
logger.exception('Importing matplotlib failed. Plotting will not work.')
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,8 @@ class TestCommand(test_command):
|
||||||
sys.modules.update(old_modules)
|
sys.modules.update(old_modules)
|
||||||
working_set.__init__()
|
working_set.__init__()
|
||||||
|
|
||||||
|
with open('requirements.txt', 'r') as f:
|
||||||
|
install_requires = f.read().splitlines()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='fbprophet',
|
name='fbprophet',
|
||||||
|
|
@ -106,11 +108,7 @@ setup(
|
||||||
packages=['fbprophet', 'fbprophet.tests'],
|
packages=['fbprophet', 'fbprophet.tests'],
|
||||||
setup_requires=[
|
setup_requires=[
|
||||||
],
|
],
|
||||||
install_requires=[
|
install_requires=install_requires,
|
||||||
'matplotlib',
|
|
||||||
'pandas>=0.18.1',
|
|
||||||
'pystan>=2.14',
|
|
||||||
],
|
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
# For Python 3, Will enforce that tests are run after a build.
|
# For Python 3, Will enforce that tests are run after a build.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue