diff --git a/DESCRIPTION.rst b/DESCRIPTION.rst new file mode 100644 index 0000000..898081a --- /dev/null +++ b/DESCRIPTION.rst @@ -0,0 +1,32 @@ +The SEG Y file format is one of several standards developed by the Society of Exploration Geophysicists for storing +geophysical seismic data. It is an open standard, and is controlled by the SEG Technical Standards Committee, a +non-profit organization. + +This project aims to implement an open SEG Y module in Python for transporting seismic data between SEG Y files and +Python data structures in pure Python. + + +Status +====== + +*Segpy 2* is currently in alpha, so expect rough edges. That said, it seems to broadly work and is largely feature +complete. + + +What It Does +============ + +How To Get It +============= + +*Segpy* is available on the Python Package index and can be installed with ``pip``:: + + $ pip install segpy + + +Requirements +============ + +*Segpy 2* work with Python 3.2 and higher (and 2.7 for now). For the majority of use *Segpy 2* has no external +dependencies. Optional modules with further dependencies such as *Numpy* are included in the ``segpy.ext`` package of +extras. diff --git a/README.rst b/README.rst index 908cb45..14c276d 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ -===== -Segpy -===== +======= +Segpy 2 +======= Status ====== @@ -18,4 +18,11 @@ geophysical seismic data. It is an open standard, and is controlled by the SEG T non-profit organization. This project aims to implement an open SEG Y module in Python for transporting seismic data between SEG Y files and -Numpy arrays. Segpy is a package for reading, writing and manipulating SEG Y data in pure Python. +Python data structures in pure Python. + +Segpy Versions +============== + +Segpy 2.0 is a complete re-imagining of a SEG Y reader in Python and represents a complete break from Segpy 1.0 in terms +of the interface it presents to clients and the implementation behind those interfaces. Segpy 1.0 should be considered +unmaintained legacy software. The present and future of Segpy is Segpy 2. \ No newline at end of file diff --git a/segpy/__init__.py b/segpy/__init__.py index 8b13789..a790050 100644 --- a/segpy/__init__.py +++ b/segpy/__init__.py @@ -1 +1 @@ - +__version__ = '2.0.0a1' diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..79bc678 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[bdist_wheel] +# This flag says that the code is written to work on both Python 2 and Python +# 3. If at all possible, it is good practice to do this. If you cannot, you +# will need to generate wheels for each Python version that you support. +universal=1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..efcb951 --- /dev/null +++ b/setup.py @@ -0,0 +1,118 @@ +import io +import os +import re +from setuptools import setup, find_packages # Always prefer setuptools over distutils +from codecs import open # To use a consistent encoding +from os import path + + +def read(*names, **kwargs): + with io.open( + os.path.join(os.path.dirname(__file__), *names), + encoding=kwargs.get("encoding", "utf8") + ) as fp: + return fp.read() + + +def find_version(*file_paths): + version_file = read(*file_paths) + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", + version_file, re.M) + if version_match: + return version_match.group(1) + raise RuntimeError("Unable to find version string.") + + +here = path.abspath(path.dirname(__file__)) + +# Get the long description from the relevant file +with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: + long_description = f.read() + +setup( + name='Segpy', + + # Versions should comply with PEP440. For a discussion on single-sourcing + # the version across setup.py and the project code, see + # https://packaging.python.org/en/latest/single_source_version.html + version=find_version("segpy/__init__.py"), + + description='Transfer of seismic data to and from SEG Y files', + long_description=long_description, + + # The project's main homepage. + url='https://github.com/rob-smallshire/segpy', + + # Author details + author='Robert Smallshire', + author_email='robert@smallshire.org.uk', + + # Choose your license + license='GPL', + + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers + classifiers=[ + # How mature is this project? Common values are + # 3 - Alpha + # 4 - Beta + # 5 - Production/Stable + 'Development Status :: 3 - Alpha', + + # Indicate who your project is intended for + 'Intended Audience :: Developers', + 'Topic :: Software Development :: Build Tools', + + # Pick your license as you wish (should match "license" above) + 'License :: OSI Approved :: MIT License', + + # Specify the Python versions you support here. In particular, ensure + # that you indicate whether you support Python 2, Python 3 or both. + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + ], + + # What does your project relate to? + keywords='seismic geocomputing geophysics', + + # You can just specify the packages manually here if your project is + # simple. Or you can use find_packages(). + packages=find_packages(exclude=['contrib', 'docs', 'test*']), + + # List run-time dependencies here. These will be installed by pip when your + # project is installed. For an analysis of "install_requires" vs pip's + # requirements files see: + # https://packaging.python.org/en/latest/requirements.html + install_requires=[], + + # List additional groups of dependencies here (e.g. development dependencies). + # You can install these using the following syntax, for example: + # $ pip install -e .[dev,test] + extras_require = { + 'dev': ['check-manifest', 'wheel'], + 'doc': ['sphinx', 'cartouche'], + 'test': ['coverage', 'hypothesis'], + }, + + # If there are data files included in your packages that need to be + # installed, specify them here. If using Python 2.6 or less, then these + # have to be included in MANIFEST.in as well. + package_data={ + }, + + # Although 'package_data' is the preferred approach, in some case you may + # need to place data files outside of your packages. + # see http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files + # In this case, 'data_file' will be installed into '/my_data' + data_files=[], + + # To provide executable scripts, use entry points in preference to the + # "scripts" keyword. Entry points provide cross-platform support and allow + # pip to create the appropriate form of executable for the target platform. + entry_points={ + 'console_scripts': [ + ], + }, +) +