/
setup.py
60 lines (55 loc) · 1.92 KB
/
setup.py
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
58
59
60
####
# This is a basic setup.py structure so we can generate
# distributable package information with setuptools.
# Testing environment for later: https://test.pypi.org/
# More information: https://packaging.python.org/tutorials/packaging-projects/
####
###
# Local install:
# Create virtual environment:
# $ conda create -n packCondaTest python=3.7.1 anaconda
# Activate:
# $ conda activate packCondaTest
# Generate distribution files (untracked by git):
# $ (packCondaTest) python3 setup.py sdist bdist_wheel
# Install the generated library for the environment:
# $ (packCondaTest) pip install .
# The library is now in the packCondaTest environment.
##
_SphinxVersion = "1.8.2"
_name = "magpylib"
_magPyVersion = "1.0.0-beta"
_description = "A simple, user friendly Python 3.2+ toolbox for calculating magnetic fields from permanent magnets and current distributions."
_author_email = "magpylib@gmail.com"
_author = "Michael Ortner"
_projectUrl = "https://github.com/magpylib/magpylib"
_release = "beta"
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name=_name,
version=_magPyVersion,
author=_author,
author_email= _author_email,
description=_description,
long_description=long_description,
long_description_content_type="text/markdown",
url=_projectUrl,
packages=setuptools.find_packages(),
zip_safe = False, ## Gives the environment files so we can access docs, enables tooltips but may decrease performance
install_requires=[
'numpy',
'matplotlib',
],
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
command_options={
'build_sphinx': {
'project': ('setup.py', _name),
'version': ('setup.py', _SphinxVersion),
'release': ('setup.py', _release),
'source_dir': ('setup.py', './..')}},
)