# HG changeset patch # User Charlie Clark <charlie.clark@clark-consulting.eu> # Date 1427715388 -7200 # Mon Mar 30 13:36:28 2015 +0200 # Node ID dd7e01713cd8f9b767a576f1848ff5dfcace25e2 # Parent 00f47b19193917df8264164ed01bb2b644e386ba Create package diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 diff --git a/__init__.py b/et_xmlfile/__init__.py rename from __init__.py rename to et_xmlfile/__init__.py diff --git a/common_imports.py b/et_xmlfile/common_imports.py rename from common_imports.py rename to et_xmlfile/common_imports.py --- a/common_imports.py +++ b/et_xmlfile/common_imports.py @@ -15,7 +15,6 @@ except: from urllib.request import pathname2url -from lxml import etree def make_version_tuple(version_string): l = [] diff --git a/test_incremental_xmlfile.py b/et_xmlfile/test_incremental_xmlfile.py rename from test_incremental_xmlfile.py rename to et_xmlfile/test_incremental_xmlfile.py --- a/test_incremental_xmlfile.py +++ b/et_xmlfile/test_incremental_xmlfile.py @@ -11,7 +11,7 @@ import unittest import tempfile, os, sys -from .common_imports import etree, HelperTestCase, skipIf +from .common_imports import HelperTestCase, skipIf from . import xmlfile as etree import pytest diff --git a/xmlfile.py b/et_xmlfile/xmlfile.py rename from xmlfile.py rename to et_xmlfile/xmlfile.py diff --git a/pytest.ini b/pytest.ini new file mode 100644 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +addopts = -l --strict +norecursedirs = lib include .tox \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100755 --- /dev/null +++ b/setup.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python + +"""Setup script for packaging et_xmfile. + +Requires setuptools. + +To build the setuptools egg use + python setup.py bdist_egg +and either upload it to the PyPI with: + python setup.py upload +or upload to your own server and register the release with PyPI: + python setup.py register + +A source distribution (.zip) can be built with + python setup.py sdist --format=zip + +That uses the manifest.in file for data files rather than searching for +them here. + +""" + +import sys +import os +import warnings +if sys.version_info < (2, 6): + raise Exception("Python >= 2.6 is required.") +elif sys.version_info[:2] == (3, 2): + warnings.warn("Python 3.2 is no longer officially supported") + +from setuptools import setup, Extension, find_packages +import re + +here = os.path.abspath(os.path.dirname(__file__)) +try: + with open(os.path.join(here, 'README.rst')) as f: + README = f.read() +except IOError: + README = '' + + +__author__ = 'See AUTHORS' +__license__ = 'MIT' +__author_email__ = 'charlie.clark@clark-consulting.eu' +__url__ = 'https://bitbucket.org/openpyxl/et_xmlfile' + + +setup(name='et_xmlfile', + packages=find_packages(), + # metadata + version="1.0.0", + description="An implementation of lxml.xmlfile for the standard library", + long_description=README, + author=__author__, + author_email=__author_email__, + url=__url__, + license=__license__, + requires=[ + 'python (>=2.6.0)', + ], + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + ], + )