OSDN Git Service

fix test
[meshio/pymeshio.git] / setup.py
1 #!/usr/bin/env python
2 # coding: utf-8
3
4 from setuptools import setup
5 import sys
6 import os
7 import shutil
8
9 name='pymeshio'
10 version='2.1.0'
11 short_description='pure python 3d model io library'
12 long_description='''\
13 `pymeshio` is a package for 3d model io.
14 create for blender import/expoert plugin backend.
15
16 Requirements
17 ------------
18 * Python 3
19 * Python 2.7
20
21 Features
22 --------
23 * read/write Metasequioa mqo format
24 * read/write MikuMikuDance pmd format
25 * read-only  MikuMikuDance pmx format
26 * read/write MikuMikuDance vmd format
27 * read/write MikuMikuDance vpd format
28
29
30 Setup
31 -----
32 ::
33
34    $ easy_install pymeshio
35    or
36    $ unzip pymeshio-x.x.x.zip
37    $ cd pymeshio-x.x.x
38    $ python setup.py install
39
40 Usage
41 -----
42 ::
43
44     >>> import pymeshio.pmx.reader
45     >>> m=pymeshio.pmx.reader.read('resources/初音ミクVer2.pmx')
46     >>> print(m)
47     <pmx-2.0 "Miku Hatsune" 12354vertices>
48     >>> print(dir(m))
49     ['__class__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', 'bones', 'comment', 'display_slots', 'english_comment', 'english_name', 'indices', 'joints', 'materials', 'morphs', 'name', 'rigidbodies', 'textures', 'version', 'vertices']
50
51 ToDo
52 --------
53
54 * pmx writer
55 * pmd to pmx converter
56 * blender importer for pmx
57 * blender exporter for pmx
58
59
60 History
61 -------
62 2.1.0 (2011-10-02)
63
64 * refactoring api
65
66 2.0.2 (2011-10-01)
67 ~~~~~~~~~~~~~~~~~~
68 * fix for Python 2.7(remove anotation)
69 * fix pymeshio.pmx.Bdef1.bone_index to index0
70 * fix pymeshio.pmx.Material.index_count to vertex_count
71 * add pmx example
72
73 2.0.0 (2011-9-30)
74 ~~~~~~~~~~~~~~~~~~
75 * add pmx loader
76
77 1.9.2 (2011-9-29)
78 ~~~~~~~~~~~~~~~~~~
79 * add tkinter viewer sample
80
81 1.9.1 (2011-9-23)
82 ~~~~~~~~~~~~~~~~~~
83 * register pypi
84 '''
85
86 classifiers=[
87         'Programming Language :: Python :: 3',
88         'License :: OSI Approved :: zlib/libpng License',
89         'Topic :: Multimedia :: Graphics :: 3D Modeling',
90         ]
91
92 # copy pymeshio dir for blender25 plugin
93 PYMESHIO_DIR_IN_BLENDER='blender25-meshio/pymeshio'
94 if os.path.exists(PYMESHIO_DIR_IN_BLENDER):
95     shutil.rmtree(PYMESHIO_DIR_IN_BLENDER)    
96 print("copy pymeshio to blender-25")
97 shutil.copytree('pymeshio', PYMESHIO_DIR_IN_BLENDER)
98
99 setup(
100         name=name,
101         version=version,
102         description=short_description,
103         long_description=long_description,
104         classifiers=classifiers,
105         keywords=['mqo', 'pmd', 'pmx', 'vmd', 'vpd', 'mmd', 'blender'],
106         author='ousttrue',
107         author_email='ousttrue@gmail.com',
108         url='http://meshio.sourceforge.jp/',
109         license='zlib',
110         #package_dir={
111         #    'pymeshio': 'blender25-meshio/pymeshio'
112         #    },
113         packages=['pymeshio'],
114         test_suite='nose.collector',
115         tests_require=['Nose'],
116         zip_safe = (sys.version>="2.5"),   # <2.5 needs unzipped for -m to work
117         )
118