forked from CR10-dv/geospatial-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
57 lines (51 loc) · 2.18 KB
/
setup.py
File metadata and controls
57 lines (51 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# -*- coding: utf-8 -*-
"""Alternations to setup.py based on Brandon Rhodes' conda setup.py:
https://github.com/brandon-rhodes/conda-install"""
from setuptools import setup
from setuptools.command.install import install
from io import open
import subprocess
descript = ('geospatial-learn is a Python module for using scikit-learn and'
'xgb models with geo-spatial data, chiefly raster and vector'
'formats.')
with open('README.rst', encoding='utf-8') as f:
long_description = f.read()
class CondaInstall(install):
def run(self):
try:
command = ['conda', 'install', '-y']
packages = open('conda_modules.txt').read().splitlines()
command.extend(packages)
subprocess.check_call(command)
install.do_egg_install(self)
except subprocess.CalledProcessError:
print("Conda install failed: do you have Anaconda/miniconda installed and on your PATH?")
setup(
cmdclass={'install': CondaInstall},
name="geospatial-learn",
version="0.3",
packages=['geospatial_learn'],
install_requires=open('requirements.txt').read().splitlines(),
# Project uses reStructuredText, so ensure that the docutils get
# installed or upgraded on the target machine
include_package_data=True,# {
# If any package contains *.txt or *.rst files, include them:
# And include any *.msg files found in the 'hello' package, too:
#},
classifiers=[
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: GIS',
'Topic :: Utilities'],
# metadata for upload to PyPI
# zip_safe = True,
author="Ciaran Robb and John Roberts",
description=descript,
long_description=long_description,
license='GPLv3+',
url="https://github.com/Ciaran1981/geospatial-learn", # project home page, if any
download_url="https://github.com/Ciaran1981/geospatial-learn"
# could also include long_description, download_url, classifiers, etc.
)