diff --git a/.gitignore b/.gitignore index c1abef7..2fe3678 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,21 @@ -# Python metadata +# Python bytecode. *.py[co] # Generated distribution files. # :see: https://packaging.python.org/distributing/ +PyOTA.egg-info/* build/* dist/* -PyOTA.egg-info/* -*.so + +# Created by ``setup.py test``. +.eggs/* # Virtualenvs for unit tests. -# :see: https://tox.readthedocs.io/en/latest/ +# https://tox.readthedocs.io/en/latest/ .tox/* -# Generated documentation files. -docs/_build - # # Note: For environment- or IDE-specific metadata (e.g., .DS_Store, .idea, etc. -# you can add these to your own "global" .gitignore file. -# :see: https://help.github.com/articles/ignoring-files/#create-a-global-gitignore +# you can add these to your own "global" .gitignore file. +# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore # diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..6f2eb85 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include LICENSE +recursive-include examples *.py +recursive-include test *.py diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index cbab78c..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = PyOTA -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 47fc243..0000000 --- a/docs/conf.py +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# PyOTA documentation build configuration file, created by -# sphinx-quickstart on Mon Dec 5 21:20:31 2016. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.viewcode', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = 'PyOTA' -copyright = '2016, IOTA Foundation' -author = 'Phoenix Zerin' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# - -# # :see: http://stackoverflow.com/a/2073599/ -# from pkg_resources import require -# __version__ = require('PyOTA')[0].version -# -# # The short X.Y version. -# version = __version__ -# # The full version, including alpha/beta/rc tags. -# release = __version__ - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'alabaster' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = 'PyOTAdoc' - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'PyOTA.tex', 'PyOTA Documentation', - 'Phoenix Zerin', 'manual'), -] - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'pyota', 'PyOTA Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'PyOTA', 'PyOTA Documentation', - author, 'PyOTA', 'One line description of project.', - 'Miscellaneous'), -] - - - diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 3db97a5..0000000 --- a/docs/index.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. PyOTA documentation master file, created by - sphinx-quickstart on Mon Dec 5 21:20:31 2016. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to PyOTA's documentation! -================================= - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 6675022..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,36 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build -set SPHINXPROJ=PyOTA - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd diff --git a/examples/__init__.py b/examples/__init__.py deleted file mode 100644 index 3f3d02d..0000000 --- a/examples/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# coding=utf-8 -from __future__ import absolute_import, division, print_function, \ - unicode_literals diff --git a/iota b/iota new file mode 120000 index 0000000..ea5fdd8 --- /dev/null +++ b/iota @@ -0,0 +1 @@ +src/iota \ No newline at end of file diff --git a/setup.py b/setup.py index 22a045c..9a019a9 100644 --- a/setup.py +++ b/setup.py @@ -17,17 +17,6 @@ if (version_info[0] == 3) and (version_info[1] < 5): raise EnvironmentError('PyOTA requires Python 3.5 or greater.') -## -# Determine dependencies, depending on Python version. -dependencies = [ - 'filters', - 'requests', - 'six', - ] - -if version_info[0:2] < (3, 5): - dependencies.append('typing') - ## # Load long description for PyPi. with open('README.rst', 'r', 'utf-8') as f: # type: StreamReader @@ -39,14 +28,19 @@ name = 'PyOTA', description = 'IOTA API library for Python', url = 'https://github.com/iotaledger/iota.lib.py', - version = '1.0.0b3', + version = '1.0.0b4', - packages = ['iota'] + ['iota.'+pkg for pkg in find_packages('iota')], - package_data = {'': ['LICENSE']}, + packages = find_packages('src'), + include_package_data = True, long_description = long_description, - install_requires = dependencies, + install_requires = [ + 'filters', + 'requests', + 'six', + 'typing', + ], test_suite = 'test', test_loader = 'nose.loader:TestLoader', diff --git a/iota/__init__.py b/src/iota/__init__.py similarity index 100% rename from iota/__init__.py rename to src/iota/__init__.py diff --git a/iota/adapter.py b/src/iota/adapter.py similarity index 100% rename from iota/adapter.py rename to src/iota/adapter.py diff --git a/iota/api.py b/src/iota/api.py similarity index 100% rename from iota/api.py rename to src/iota/api.py diff --git a/iota/codecs.py b/src/iota/codecs.py similarity index 100% rename from iota/codecs.py rename to src/iota/codecs.py diff --git a/iota/commands/__init__.py b/src/iota/commands/__init__.py similarity index 100% rename from iota/commands/__init__.py rename to src/iota/commands/__init__.py diff --git a/iota/commands/core/__init__.py b/src/iota/commands/core/__init__.py similarity index 100% rename from iota/commands/core/__init__.py rename to src/iota/commands/core/__init__.py diff --git a/iota/commands/core/add_neighbors.py b/src/iota/commands/core/add_neighbors.py similarity index 100% rename from iota/commands/core/add_neighbors.py rename to src/iota/commands/core/add_neighbors.py diff --git a/iota/commands/core/attach_to_tangle.py b/src/iota/commands/core/attach_to_tangle.py similarity index 100% rename from iota/commands/core/attach_to_tangle.py rename to src/iota/commands/core/attach_to_tangle.py diff --git a/iota/commands/core/broadcast_transactions.py b/src/iota/commands/core/broadcast_transactions.py similarity index 100% rename from iota/commands/core/broadcast_transactions.py rename to src/iota/commands/core/broadcast_transactions.py diff --git a/iota/commands/core/find_transactions.py b/src/iota/commands/core/find_transactions.py similarity index 100% rename from iota/commands/core/find_transactions.py rename to src/iota/commands/core/find_transactions.py diff --git a/iota/commands/core/get_balances.py b/src/iota/commands/core/get_balances.py similarity index 100% rename from iota/commands/core/get_balances.py rename to src/iota/commands/core/get_balances.py diff --git a/iota/commands/core/get_inclusion_states.py b/src/iota/commands/core/get_inclusion_states.py similarity index 100% rename from iota/commands/core/get_inclusion_states.py rename to src/iota/commands/core/get_inclusion_states.py diff --git a/iota/commands/core/get_neighbors.py b/src/iota/commands/core/get_neighbors.py similarity index 100% rename from iota/commands/core/get_neighbors.py rename to src/iota/commands/core/get_neighbors.py diff --git a/iota/commands/core/get_node_info.py b/src/iota/commands/core/get_node_info.py similarity index 100% rename from iota/commands/core/get_node_info.py rename to src/iota/commands/core/get_node_info.py diff --git a/iota/commands/core/get_tips.py b/src/iota/commands/core/get_tips.py similarity index 100% rename from iota/commands/core/get_tips.py rename to src/iota/commands/core/get_tips.py diff --git a/iota/commands/core/get_transactions_to_approve.py b/src/iota/commands/core/get_transactions_to_approve.py similarity index 100% rename from iota/commands/core/get_transactions_to_approve.py rename to src/iota/commands/core/get_transactions_to_approve.py diff --git a/iota/commands/core/get_trytes.py b/src/iota/commands/core/get_trytes.py similarity index 100% rename from iota/commands/core/get_trytes.py rename to src/iota/commands/core/get_trytes.py diff --git a/iota/commands/core/interrupt_attaching_to_tangle.py b/src/iota/commands/core/interrupt_attaching_to_tangle.py similarity index 100% rename from iota/commands/core/interrupt_attaching_to_tangle.py rename to src/iota/commands/core/interrupt_attaching_to_tangle.py diff --git a/iota/commands/core/remove_neighbors.py b/src/iota/commands/core/remove_neighbors.py similarity index 100% rename from iota/commands/core/remove_neighbors.py rename to src/iota/commands/core/remove_neighbors.py diff --git a/iota/commands/core/store_transactions.py b/src/iota/commands/core/store_transactions.py similarity index 100% rename from iota/commands/core/store_transactions.py rename to src/iota/commands/core/store_transactions.py diff --git a/iota/commands/extended/__init__.py b/src/iota/commands/extended/__init__.py similarity index 100% rename from iota/commands/extended/__init__.py rename to src/iota/commands/extended/__init__.py diff --git a/iota/commands/extended/broadcast_and_store.py b/src/iota/commands/extended/broadcast_and_store.py similarity index 100% rename from iota/commands/extended/broadcast_and_store.py rename to src/iota/commands/extended/broadcast_and_store.py diff --git a/iota/commands/extended/get_bundles.py b/src/iota/commands/extended/get_bundles.py similarity index 100% rename from iota/commands/extended/get_bundles.py rename to src/iota/commands/extended/get_bundles.py diff --git a/iota/commands/extended/get_inputs.py b/src/iota/commands/extended/get_inputs.py similarity index 100% rename from iota/commands/extended/get_inputs.py rename to src/iota/commands/extended/get_inputs.py diff --git a/iota/commands/extended/get_latest_inclusion.py b/src/iota/commands/extended/get_latest_inclusion.py similarity index 100% rename from iota/commands/extended/get_latest_inclusion.py rename to src/iota/commands/extended/get_latest_inclusion.py diff --git a/iota/commands/extended/get_new_addresses.py b/src/iota/commands/extended/get_new_addresses.py similarity index 100% rename from iota/commands/extended/get_new_addresses.py rename to src/iota/commands/extended/get_new_addresses.py diff --git a/iota/commands/extended/get_transfers.py b/src/iota/commands/extended/get_transfers.py similarity index 100% rename from iota/commands/extended/get_transfers.py rename to src/iota/commands/extended/get_transfers.py diff --git a/iota/commands/extended/prepare_transfer.py b/src/iota/commands/extended/prepare_transfer.py similarity index 100% rename from iota/commands/extended/prepare_transfer.py rename to src/iota/commands/extended/prepare_transfer.py diff --git a/iota/commands/extended/replay_bundle.py b/src/iota/commands/extended/replay_bundle.py similarity index 100% rename from iota/commands/extended/replay_bundle.py rename to src/iota/commands/extended/replay_bundle.py diff --git a/iota/commands/extended/send_transfer.py b/src/iota/commands/extended/send_transfer.py similarity index 100% rename from iota/commands/extended/send_transfer.py rename to src/iota/commands/extended/send_transfer.py diff --git a/iota/commands/extended/send_trytes.py b/src/iota/commands/extended/send_trytes.py similarity index 100% rename from iota/commands/extended/send_trytes.py rename to src/iota/commands/extended/send_trytes.py diff --git a/iota/crypto/__init__.py b/src/iota/crypto/__init__.py similarity index 100% rename from iota/crypto/__init__.py rename to src/iota/crypto/__init__.py diff --git a/iota/crypto/addresses.py b/src/iota/crypto/addresses.py similarity index 100% rename from iota/crypto/addresses.py rename to src/iota/crypto/addresses.py diff --git a/iota/crypto/pycurl.py b/src/iota/crypto/pycurl.py similarity index 100% rename from iota/crypto/pycurl.py rename to src/iota/crypto/pycurl.py diff --git a/iota/crypto/signing.py b/src/iota/crypto/signing.py similarity index 100% rename from iota/crypto/signing.py rename to src/iota/crypto/signing.py diff --git a/iota/crypto/types.py b/src/iota/crypto/types.py similarity index 100% rename from iota/crypto/types.py rename to src/iota/crypto/types.py diff --git a/iota/exceptions.py b/src/iota/exceptions.py similarity index 100% rename from iota/exceptions.py rename to src/iota/exceptions.py diff --git a/iota/filters.py b/src/iota/filters.py similarity index 100% rename from iota/filters.py rename to src/iota/filters.py diff --git a/iota/json.py b/src/iota/json.py similarity index 100% rename from iota/json.py rename to src/iota/json.py diff --git a/iota/transaction.py b/src/iota/transaction.py similarity index 100% rename from iota/transaction.py rename to src/iota/transaction.py diff --git a/iota/types.py b/src/iota/types.py similarity index 100% rename from iota/types.py rename to src/iota/types.py