diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c9d4368 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] + +# Distribution / packaging +*.egg-info/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..809c1a7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019, Daniel Weschke + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..30a2781 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +graft src + +global-exclude *.py[cod] diff --git a/README b/README new file mode 100644 index 0000000..dfc2bc7 --- /dev/null +++ b/README @@ -0,0 +1,20 @@ +* Install +Install in "development mode" so any change of the program is effective. + +Note: For system wide (global) installation log in as root or use sudo for example. +For local (user) installation the local path must be in the PYTHONPATH environment variable. +Typically $HOME/.local/lib/pythonX.Y/site-packages + +' pip install -e . +or +' pip install --user -e . +or +' python -m pip install -e . +or +' easy_install --prefix=$HOME/.local -e . +or +' pip install --install-option="--prefix-$HOME/.local" -e . + + +* Uninstall +pip uninstall mechanics diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..16d8b79 --- /dev/null +++ b/setup.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +from os import path +from setuptools import setup, find_packages + +with open(path.join(path.abspath(path.dirname(__file__)), 'README'), encoding='utf-8') as f: + long_description = f.read() + +setup( + name="mechanics", + version="2019.2.12", + description="mechanical tools", + long_description=long_description, + author="Daniel Weschke", + author_email="daniel.weschke@directbox.de", + package_dir={'': 'src'}, + packages=find_packages("src"), + py_scripts = [ + 'plate.py', + 'tube.py', + ], + entry_points={ + 'console_scripts': ['plate=plate:main', 'tube=tube:main'], + }, + keywords = 'mechanics plate tube stress', + license="MIT", + classifiers=[ + 'Environment :: Console', + 'Intended Audience :: Education', + 'Intended Audience :: End Users/Desktop', + 'Intended Audience :: Developers', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Topic :: Scientific/Engineering', + 'Topic :: Scientific/Engineering :: Physics' + ] +) diff --git a/plate.py b/src/plate.py similarity index 100% rename from plate.py rename to src/plate.py diff --git a/tube.py b/src/tube.py similarity index 100% rename from tube.py rename to src/tube.py