Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a setup.py file for installation and packaging #18

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Provide a setup.py file for installation and packaging #18

wants to merge 14 commits into from

Conversation

thenewguy
Copy link

No description provided.

@certik
Copy link
Member

certik commented Nov 19, 2011

Thanks a lot for the patch. I tried it on Ubuntu 11.10 and I got:


ondrej@eagle:~/repos/py2js(thenewguy-dev)$ make
make -C examples generate
make[1]: Entering directory `/home/ondrej/repos/py2js/examples'
Compiling [gol.py]
Traceback (most recent call last):
  File "gol.py", line 1, in <module>
    from py2js.decorator import JavaScript
  File "/home/ondrej/repos/py2js/py2js/__init__.py", line 8, in <module>
    __version__ = get_version()
  File "/home/ondrej/repos/py2js/_version.py", line 46, in get_version
    raise ValueError('Could not determine version.')
ValueError: Could not determine version.
make[1]: *** [gol.html] Error 1
make[1]: Leaving directory `/home/ondrej/repos/py2js/examples'
make: *** [all] Error 2

Does make work for you on Windows?

@certik
Copy link
Member

certik commented Nov 19, 2011

Also, try to run tests:

./run_tests.py

I run them in your branch by using the generated files from the master and some of them failed for me. Do all tests pass for you?

@thenewguy
Copy link
Author

Make and tests work for me on Ubuntu. I have provided a list of commands to produce the environment in an AWS EC2 instance. Is it acceptable to require an install before make will work?

I have also tested on Windows 7 and all tests pass.

Note that it took a recent copy of v8 compiled from svn for the tests to pass. Otherwise roughly 23 failed.

aws instance: ami-a7762ae2 (Ubuntu 11.10)

sudo apt-get install -y git python-setuptools make subversion scons lynx gcc g++

cd ~
svn checkout http://v8.googlecode.com/svn/trunk/ v8
cd v8

sudo scons d8 -j4

sudo cp ./d8 /usr/bin/js

cd ~
git clone https://github.com/thenewguy/py2js.git
cd py2js

sudo python setup.py install
sudo make
sudo python run_tests.py

@certik
Copy link
Member

certik commented Nov 21, 2011

Currently py2js works without having to use "sudo" nor to install it. (Of course, you should be able to install it as well.)
I would like to keep it that way, so that one can develop/test it quickly without having to install it.

It must be possible to improve your patch to make this work. I am currently busy to figure it out, but if you get stuck, I'll try to find some time for it.

Here is the tests log from the latest master with Ubuntu's v8:

https://gist.github.com/1383861

as you can see, all tests pass. Can you post here what tests fail for you with Ubuntu's v8? Does it fail only with your branch or also with master?

Thanks again for all your work.

@thenewguy
Copy link
Author

Ondřej,

I don't think it will be very difficult to adjust the patch. I think the Makefile just needs another command or two to shuffle some files around.

I will report back about the tests. I don't think there was a problem though. I think it was just user error on my part. I got it all to work when I installed from vanilla source. So that leads me to believe I messed something up when I was setting up the ec2 instance the first time.

@certik
Copy link
Member

certik commented Nov 22, 2011

I think so too, it should be simple. If you do it, then I can test that things still work on my machine and I can merge this patch in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants