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

Python version not available from pypi #21

Closed
GoogleCodeExporter opened this issue Nov 28, 2015 · 6 comments
Closed

Python version not available from pypi #21

GoogleCodeExporter opened this issue Nov 28, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

Hi all, thanks for great library. I think it would be very convenient if you 
could submit poly2tri to pypi package repository. It's kinda difficult to add 
it as dependency to production environment. pip of course supports mercurial 
repos but still, it would be easier for everyone. Thanks

Original issue reported on code.google.com by dusan.ma...@gmail.com on 4 Mar 2011 at 2:33

@GoogleCodeExporter
Copy link
Author

So it seems that it's not possible to install with pip at all.


Installing collected packages: floorpy, poly2tri
  Running setup.py develop for floorpy
    install_dir /home/skrat/workspace/dd/geri/lib/python2.6/site-packages/
    Creating /home/skrat/workspace/dd/geri/lib/python2.6/site-packages/floorpy.egg-link (link to .) 
    floorpy 0.2 is already the active version in easy-install.pth

    Installed /home/skrat/workspace/dd/geri/src/floorpy
  Running setup.py develop for poly2tri
    install_dir /home/skrat/workspace/dd/geri/lib/python2.6/site-packages/
    building 'p2t' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c src/p2t.c -o build/temp.linux-i686-2.6/src/p2t.o
    gcc: src/p2t.c: No such file or directory
    gcc: no input files
    error: command 'gcc' failed with exit status 1
    Complete output from command /home/skrat/workspace/dd/geri/bin/python -c "import setuptools; __file__='/home/skrat/workspace/dd/geri/src/poly2tri/setup.py'; execfile('/home/skrat/workspace/dd/geri/src/poly2tri/setup.py')" develop --no-deps:
    running develop

Original comment by dusan.ma...@gmail.com on 5 Mar 2011 at 12:08

@GoogleCodeExporter
Copy link
Author

The Python version of poly2tri wraps the C++ version via. Cython. I'm currently 
working to update the C++ code, and also in the process of creating a pure C 
port. As soon as I finish with this stuff, I'll take a second look at Python 
and update the project accordingly. I don't have much experience with pip or 
installing pypi packages, so if you would like to contribute that would be 
excellent...

Original comment by mason.gr...@gmail.com on 5 Mar 2011 at 1:52

@GoogleCodeExporter
Copy link
Author

Also, did you try compiling p2t with 'python setup.py build_ext -i' ?


Original comment by mason.gr...@gmail.com on 5 Mar 2011 at 1:53

@GoogleCodeExporter
Copy link
Author

With a bit of hacking, it's online http://pypi.python.org/pypi/poly2tri/0.3.3
I attached a patch for setup.py. You can later change it to support C port.

If you need to release new version, change the number in setup.py and run 
setup.py with: clean sdist register upload

You need pypi account for that, let me know then I'll add you as an owner.

Original comment by dusan.ma...@gmail.com on 5 Mar 2011 at 2:14

Attachments:

@GoogleCodeExporter
Copy link
Author

Excellent, thanks Duan.Maliarik! I've applied your patch and committed to the 
Python repo - much appreciated!

/Mason

Original comment by mason.gr...@gmail.com on 5 Mar 2011 at 7:28

  • Changed state: Done

@GoogleCodeExporter
Copy link
Author

Also unable to build:

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 
-Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c 
poly2tri/sweep/advancing_front.cc -o 
build/temp.linux-x86_64-2.7/poly2tri/sweep/advancing_front.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for 
C/ObjC but not for C++ [enabled by default]
In file included from poly2tri/sweep/advancing_front.cc:31:0:
poly2tri/sweep/advancing_front.h: In constructor 
‘p2t::Node::Node(p2t::Point&)’:
poly2tri/sweep/advancing_front.h:49:10: warning: ‘p2t::Node::value’ will be 
initialized after [-Wreorder]
   double value;
          ^
poly2tri/sweep/advancing_front.h:46:9: warning:   ‘p2t::Node* 
p2t::Node::next’ [-Wreorder]
   Node* next;
         ^
poly2tri/sweep/advancing_front.h:51:3: warning:   when initialized here 
[-Wreorder]
   Node(Point& p) : point(&p), triangle(NULL), value(p.x), next(NULL), prev(NULL)
   ^
poly2tri/sweep/advancing_front.h: In constructor 
‘p2t::Node::Node(p2t::Point&, p2t::Triangle&)’:
poly2tri/sweep/advancing_front.h:49:10: warning: ‘p2t::Node::value’ will be 
initialized after [-Wreorder]
   double value;
          ^
poly2tri/sweep/advancing_front.h:46:9: warning:   ‘p2t::Node* 
p2t::Node::next’ [-Wreorder]
   Node* next;
         ^
poly2tri/sweep/advancing_front.h:55:3: warning:   when initialized here 
[-Wreorder]
   Node(Point& p, Triangle& t) : point(&p), triangle(&t), value(p.x),
   ^
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 
-Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c 
poly2tri/sweep/cdt.cc -o build/temp.linux-x86_64-2.7/poly2tri/sweep/cdt.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for 
C/ObjC but not for C++ [enabled by default]
In file included from poly2tri/sweep/cdt.h:35:0,
                 from poly2tri/sweep/cdt.cc:31:
poly2tri/sweep/advancing_front.h: In constructor 
‘p2t::Node::Node(p2t::Point&)’:
poly2tri/sweep/advancing_front.h:49:10: warning: ‘p2t::Node::value’ will be 
initialized after [-Wreorder]
   double value;
          ^
poly2tri/sweep/advancing_front.h:46:9: warning:   ‘p2t::Node* 
p2t::Node::next’ [-Wreorder]
   Node* next;
         ^
poly2tri/sweep/advancing_front.h:51:3: warning:   when initialized here 
[-Wreorder]
   Node(Point& p) : point(&p), triangle(NULL), value(p.x), next(NULL), prev(NULL)
   ^
poly2tri/sweep/advancing_front.h: In constructor 
‘p2t::Node::Node(p2t::Point&, p2t::Triangle&)’:
poly2tri/sweep/advancing_front.h:49:10: warning: ‘p2t::Node::value’ will be 
initialized after [-Wreorder]
   double value;
          ^
poly2tri/sweep/advancing_front.h:46:9: warning:   ‘p2t::Node* 
p2t::Node::next’ [-Wreorder]
   Node* next;
         ^
poly2tri/sweep/advancing_front.h:55:3: warning:   when initialized here 
[-Wreorder]
   Node(Point& p, Triangle& t) : point(&p), triangle(&t), value(p.x),
   ^
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 
-Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c 
poly2tri/sweep/sweep.cc -o build/temp.linux-x86_64-2.7/poly2tri/sweep/sweep.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for 
C/ObjC but not for C++ [enabled by default]
In file included from poly2tri/sweep/sweep.cc:32:0:
poly2tri/sweep/sweep_context.h: In constructor 
‘p2t::SweepContext::Basin::Basin()’:
poly2tri/sweep/sweep_context.h:105:23: error: ‘NULL’ was not declared in 
this scope
   Basin() : left_node(NULL), bottom_node(NULL), right_node(NULL), width(0.0), left_highest(false)
                       ^
poly2tri/sweep/sweep_context.h: In member function ‘void 
p2t::SweepContext::Basin::Clear()’:
poly2tri/sweep/sweep_context.h:111:17: error: ‘NULL’ was not declared in 
this scope
     left_node = NULL;
                 ^
poly2tri/sweep/sweep_context.h: In constructor 
‘p2t::SweepContext::EdgeEvent::EdgeEvent()’:
poly2tri/sweep/sweep_context.h:123:34: error: ‘NULL’ was not declared in 
this scope
   EdgeEvent() : constrained_edge(NULL), right(false)
                                  ^
In file included from poly2tri/sweep/sweep.cc:33:0:
poly2tri/sweep/advancing_front.h: In constructor 
‘p2t::Node::Node(p2t::Point&)’:
poly2tri/sweep/advancing_front.h:49:10: warning: ‘p2t::Node::value’ will be 
initialized after [-Wreorder]
   double value;
          ^
poly2tri/sweep/advancing_front.h:46:9: warning:   ‘p2t::Node* 
p2t::Node::next’ [-Wreorder]
   Node* next;
         ^
poly2tri/sweep/advancing_front.h:51:3: warning:   when initialized here 
[-Wreorder]
   Node(Point& p) : point(&p), triangle(NULL), value(p.x), next(NULL), prev(NULL)
   ^
poly2tri/sweep/advancing_front.h: In constructor 
‘p2t::Node::Node(p2t::Point&, p2t::Triangle&)’:
poly2tri/sweep/advancing_front.h:49:10: warning: ‘p2t::Node::value’ will be 
initialized after [-Wreorder]
   double value;
          ^
poly2tri/sweep/advancing_front.h:46:9: warning:   ‘p2t::Node* 
p2t::Node::next’ [-Wreorder]
   Node* next;
         ^
poly2tri/sweep/advancing_front.h:55:3: warning:   when initialized here 
[-Wreorder]
   Node(Point& p, Triangle& t) : point(&p), triangle(&t), value(p.x),
   ^
poly2tri/sweep/sweep.cc: In member function ‘void 
p2t::Sweep::SweepPoints(p2t::SweepContext&)’:
poly2tri/sweep/sweep.cc:54:46: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
     for (int i = 0; i < point.edge_list.size(); i++) {
                                              ^
poly2tri/sweep/sweep.cc: In destructor ‘p2t::Sweep::~Sweep()’:
poly2tri/sweep/sweep.cc:813:36: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
     for(int i = 0; i < nodes_.size(); i++) {
                                    ^
poly2tri/sweep/sweep.cc: In member function ‘p2t::Point& 
p2t::Sweep::NextFlipPoint(p2t::Point&, p2t::Point&, p2t::Triangle&, 
p2t::Point&)’:
poly2tri/sweep/sweep.cc:779:1: warning: control reaches end of non-void 
function [-Wreturn-type]
 }
 ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Original comment by hanson.a...@gmail.com on 2 Apr 2014 at 6:12

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

No branches or pull requests

1 participant