OSDN Git Service

add coding
[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.0.1'
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
20 Features
21 --------
22 * read/write Metasequioa mqo format
23 * read/write MikuMikuDance pmd format
24 * read-only  MikuMikuDance pmx format
25 * read/write MikuMikuDance vmd format
26 * read/write MikuMikuDance vpd format
27
28
29 Setup
30 -----
31 ::
32
33    $ easy_install pymeshio
34    or
35    $ unzip pymeshio-x.x.x.zip
36    $ cd pymeshio-x.x.x
37    $ python setup.py install
38
39 Usage
40 -----
41 ::
42
43     >>> import pymeshio.pmx.loader
44     >>> m=pymeshio.pmx.loader.load('resources/初音ミクVer2.pmx')
45     >>> print(m)
46     <pmx-2.0 "Miku Hatsune" 12354vertices>
47     >>> print(dir(m))
48     ['__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']
49
50 ToDo
51 --------
52
53 * pmx writer
54 * pmd to pmx converter
55 * blender importer for pmx
56 * blender exporter for pmx
57
58
59 History
60 -------
61 2.0.0 (2011-10-01)
62 ~~~~~~~~~~~~~~~~~~
63 * fix pymeshio.pmx.Bdef1.bone_index to index0
64 * fix pymeshio.pmx.Material.index_count to vertex_count
65 * add pmx example
66
67 2.0.0 (2011-9-30)
68 ~~~~~~~~~~~~~~~~~~
69 * add pmx loader
70
71 1.9.2 (2011-9-29)
72 ~~~~~~~~~~~~~~~~~~
73 * add tkinter viewer sample
74
75 1.9.1 (2011-9-23)
76 ~~~~~~~~~~~~~~~~~~
77 * register pypi
78 '''
79
80 classifiers=[
81         'Programming Language :: Python :: 3',
82         'License :: OSI Approved :: zlib/libpng License',
83         'Topic :: Multimedia :: Graphics :: 3D Modeling',
84         ]
85
86 # copy pymeshio dir for blender25 plugin
87 PYMESHIO_DIR_IN_BLENDER='blender25-meshio/pymeshio'
88 if os.path.exists(PYMESHIO_DIR_IN_BLENDER):
89     shutil.rmtree(PYMESHIO_DIR_IN_BLENDER)    
90 print("copy pymeshio to blender-25")
91 shutil.copytree('pymeshio', PYMESHIO_DIR_IN_BLENDER)
92
93 setup(
94         name=name,
95         version=version,
96         description=short_description,
97         long_description=long_description,
98         classifiers=classifiers,
99         keywords=['mqo', 'pmd', 'pmx', 'vmd', 'vpd', 'mmd', 'blender'],
100         author='ousttrue',
101         author_email='ousttrue@gmail.com',
102         url='http://meshio.sourceforge.jp/',
103         license='zlib',
104         #package_dir={
105         #    'pymeshio': 'blender25-meshio/pymeshio'
106         #    },
107         packages=['pymeshio'],
108         test_suite='nose.collector',
109         tests_require=['Nose'],
110         zip_safe = (sys.version>="2.5"),   # <2.5 needs unzipped for -m to work
111         )
112