Skip to main content

A gravity simulator written to taste modern Python packaging practices

Project description

gravely, a gravity simulator
============================


Introduction
------------
`gravely` is a gravity simulator,
written to taste modern Python packaging practices.

It uses [Cython](http://cython.org) compiled extensions,
depends on [Numpy](http://www.numpy.org) and [h5py](http://www.h5py.org),
compiles into a single binary with [PyInstaller](http://pyinstaller.org) and
aims to support both Linux and Windows.
Not exactly a walk in the park.


License
-------
`gravely` is distributed under the terms of the MIT License;
see [LICENSE.txt](LICENSE.txt).


Usage
-----
Pyinstaller binary:

./gravely test
./gravely run
./gravely animate

Installed Python package:

python3 -m gravely test
python3 -m gravely run
python3 -m gravely animate


Installation
------------
**First of all, try using a precompiled binary made with PyInstaller.**
If that doesn't suit you, you should report that
and proceed to installing the Python package.

The base requirements to begin with are a working C compiler,
`Python>=3.4` with development headers,
`setuptools>=20`, `numpy>=1.8.2` and `pip>=8`.
These should be enough to start installation of `gravely`
from a source archive or a precompiled wheel (`.whl`) file:

python3 -m pip install gravely-*.zip
python3 -m pip install gravely-*.whl

Other packages may or may not install automatically with pip/setuptools magic.

`gravely` also depends on `cython>=0.21` (build) and `h5py>=2.2` (run-time).
Rendering nice video animations requires `matplotlib>=1.4` and `ffmpeg`.
Testing requires `nose>=1.0`.

Try to satisfy as many of these
before attempting to build and install `gravely`.

### Linux, Debian-based
apt-get install gcc python3 python3-dev python3-setuptools python3-pip \
cython3 python3-numpy python3-matplotlib python3-nose ffmpeg

### Install necessary upgrades with pip
pip3 install 'pip>=8'
python3 -m pip install \
'cython>=0.21' 'setuptools>=20' 'matplotlib>=1.4' 'nose>=1.0'
python3 -m pip install -r requirements.txt

### Windows
Good luck.

Currently only Windows 10 and Python 3.5 are supported.

Some say that it's better to use specialized Python distributions like
[Anaconda](https://www.continuum.io) or
[Enthought Canopy](https://www.enthought.com/products/canopy)
to get the prerequisities straight.

As for vanilla Python... Visual Studio with Python support
and several pip invocations could be a good start:

python -m pip install cython numpy matplotlib nose
python -m pip install http://www.silx.org/pub/wheelhouse/h5py-2.6.0-cp35-cp35m-win_amd64.whl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gravely-0.0.2.zip (26.4 kB view details)

Uploaded Source

Built Distribution

gravely-0.0.2-cp35-cp35m-win_amd64.whl (100.7 kB view details)

Uploaded CPython 3.5m Windows x86-64

File details

Details for the file gravely-0.0.2.zip.

File metadata

  • Download URL: gravely-0.0.2.zip
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gravely-0.0.2.zip
Algorithm Hash digest
SHA256 2da96820e1bdf2bbd9b0262c287245a9c014f3f784e57f996f99a277747cefee
MD5 8864a5dfb0d716db81c3d13531584f60
BLAKE2b-256 a52f42f3a86763152342cd358067abfc4662c25f4d4de44d58cb623f22763eb7

See more details on using hashes here.

File details

Details for the file gravely-0.0.2-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for gravely-0.0.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 ec9eb97aceecdb4996caeb4e9952a5a33391e2a67899bd28a3b92884cf4b7bbc
MD5 a6d0f95a4b5d98f0329f3d15f1fb50a2
BLAKE2b-256 49cf6f8d0f67c7c7bcd75c39e1f26090d96bc10381662b76316f26e4bbb1266e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page