Skip to content

Commit

Permalink
fail more gracefully when setuptools is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed Dec 4, 2019
1 parent ace777e commit a771c63
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 10 deletions.
13 changes: 11 additions & 2 deletions core/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#!/usr/bin/env python
from setuptools import find_namespace_packages
from setuptools import setup
import os
import sys

from setuptools import setup
try:
from setuptools import find_namespace_packages
except ImportError:
# the user has a downlevel version of setuptools.
print('Error: dbt requires v40.1.0 or higher of setuptools.')
print('Please upgrade setuptools with "pip install --upgrade setuptools" '
'and try again')
sys.exit(1)


def read(fname):
Expand Down
14 changes: 12 additions & 2 deletions plugins/bigquery/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
#!/usr/bin/env python
from setuptools import find_namespace_packages
from setuptools import setup
import os
import sys

from setuptools import setup
try:
from setuptools import find_namespace_packages
except ImportError:
# the user has a downlevel version of setuptools.
print('Error: dbt requires v40.1.0 or higher of setuptools.')
print('Please upgrade setuptools with "pip install --upgrade setuptools" '
'and try again')
sys.exit(1)


package_name = "dbt-bigquery"
package_version = "0.15.0"
Expand Down
14 changes: 12 additions & 2 deletions plugins/postgres/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
#!/usr/bin/env python
from setuptools import find_namespace_packages
from setuptools import setup
import os
import sys

from setuptools import setup
try:
from setuptools import find_namespace_packages
except ImportError:
# the user has a downlevel version of setuptools.
print('Error: dbt requires v40.1.0 or higher of setuptools.')
print('Please upgrade setuptools with "pip install --upgrade setuptools" '
'and try again')
sys.exit(1)


PSYCOPG2_MESSAGE = '''
No package name override was set.
Expand Down
13 changes: 11 additions & 2 deletions plugins/redshift/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#!/usr/bin/env python
from setuptools import find_namespace_packages
from setuptools import setup
import os
import sys

from setuptools import setup
try:
from setuptools import find_namespace_packages
except ImportError:
# the user has a downlevel version of setuptools.
print('Error: dbt requires v40.1.0 or higher of setuptools.')
print('Please upgrade setuptools with "pip install --upgrade setuptools" '
'and try again')
sys.exit(1)


package_name = "dbt-redshift"
Expand Down
14 changes: 12 additions & 2 deletions plugins/snowflake/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
#!/usr/bin/env python
from setuptools import find_namespace_packages
from setuptools import setup
import os
import sys

from setuptools import setup
try:
from setuptools import find_namespace_packages
except ImportError:
# the user has a downlevel version of setuptools.
print('Error: dbt requires v40.1.0 or higher of setuptools.')
print('Please upgrade setuptools with "pip install --upgrade setuptools" '
'and try again')
sys.exit(1)


package_name = "dbt-snowflake"
package_version = "0.15.0"
Expand Down

0 comments on commit a771c63

Please sign in to comment.