X Tutup
Skip to content

Commit 7e64630

Browse files
author
Troy Melhase
committed
Prep for dist.
1 parent 6ba3fbf commit 7e64630

File tree

5 files changed

+69
-21
lines changed

5 files changed

+69
-21
lines changed

README

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
11
About
22
-----
3-
This package provides tools to (imperfectly) translate java source
3+
This package provides tools to (imperfectly) translate Java source
44
code to python source code.
55

66

7-
Build
8-
-----
9-
To build the code, install Python_ 2.5 or newer, and install PyAntlr_.
10-
Then run "make" in the top of the package.
11-
12-
.. _Python: http://www.python.org/
13-
.. _PyAntlr: http://www.antlr.org/
14-
15-
167
Install
178
-------
9+
Before you install the package, make sure you have Python_ 2.5 or
10+
newer, and that you have PyAntlr_.
1811

19-
To install the package and the scripts into your system, then as the super user, run:
12+
To install the package and the scripts into your system, then as the
13+
super user, run:
2014

2115
$ python setup.py install
2216

23-
The setup script will install the java2python package in
24-
$PYTHONHOME/site-packages, and install the scripts into a bin
25-
directory.
26-
2717

2818
Use
2919
---
30-
To use the "java_to_python" script, either make and install the
31-
package (as per above), or adjust PYTHONPATH (and possibly PATH) to
32-
include the source directories. Then run the script like so:
20+
Run the script like so:
21+
22+
$ j2py -i input_file.java
3323

34-
$ java_to_python -i input_file.java -o output_file.py
24+
Or:
25+
26+
$ j2py -i input_file.java -o output_file.py
27+
28+
The script will read from stdin when no input files are given:
29+
30+
$ j2py < some_file.java
3531

3632
The script has configuration options that you can view:
3733

38-
$ java_to_python -h
34+
$ j2py -h
35+
36+
You can customize the code generation via configuration modules. Read
37+
more about them on the wiki_.
3938

4039

4140
Feedback
4241
--------
43-
Drop me a note if you're so inclined: troy@gci.net.
42+
Drop me a note if you're so inclined: troy@gci.net.
43+
44+
45+
.. _Python: http://www.python.org/
46+
.. _PyAntlr: http://www.antlr.org/
47+
.. _wiki: http://code.google.com/p/java2python/w/list
File renamed without changes.

setup.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
"""java2python: Imperfect Translation of Java Source Code to Python
4+
5+
This package provides tools to (imperfectly) translate Java source
6+
code to python source code.
7+
"""
8+
from distutils.core import setup
9+
10+
11+
classifiers = """\
12+
Development Status :: 4 - Beta
13+
Intended Audience :: Developers
14+
License :: OSI Approved :: GNU General Public License (GPL)
15+
Natural Language :: English
16+
Operating System :: OS Independent
17+
Operating System :: POSIX
18+
Programming Language :: Python
19+
Programming Language :: Java
20+
Topic :: Software Development
21+
Topic :: Software Development :: Code Generators
22+
"""
23+
24+
doclines = __doc__.split('\n')
25+
26+
27+
setup(
28+
name = 'java2python',
29+
version = '0.1',
30+
description = doclines[0],
31+
author = 'Troy Melhase',
32+
author_email = 'troy@gci.net',
33+
url = 'http://code.google.com/p/java2python/',
34+
license = 'GNU General Public License (GPL)',
35+
packages = ['java2python', 'java2python/lib', ],
36+
scripts = ['java2python/bin/j2py', 'java2python/bin/jast_print'],
37+
package_data = {
38+
'java2python/lib':['*.g', '*.txt', ],
39+
},
40+
classifiers = filter(None, classifiers.split('\n')),
41+
long_description = '\n'.join(doclines[2:]),
42+
platforms = ['any'],
43+
download_url = 'http://code.google.com/p/java2python/downloads/list',
44+
)

0 commit comments

Comments
 (0)
X Tutup