Python - Crear setup.py para instalar un paquete

 
Vista:
sin imagen de perfil

Crear setup.py para instalar un paquete

Publicado por S (1 intervención) el 14/03/2017 21:56:58
Hola

Tengo este proyecto https://github.com/s-nt-s/XmppBot y estoy insntenado crear un setup.py para que las funciones y clases de xmppbot.py esten disponibles para otros desarrollos pero no doy con ello.

He reescrito el setup.py mil veces tomando como ejemplo:
https://github.com/null-none/jabber-bot/blob/master/setup.py
https://github.com/rshipp/python-jabberbot/blob/master/setup.py
https://git.daemons.cf/drymer/jabbergram/src/master/setup.py
https://geekytheory.com/como-subir-tu-propio-paquete-a-pypi/
http://rukbottoland.com/blog/distribucion-de-librerias-python-con-setuppy/
etc y luego a la hora de la verdad pasa esto:

1
2
3
4
5
6
7
8
$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xmppbot import botcmd, XmppBot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name botcmd

o

1
2
3
4
5
6
7
8
9
>>> from xmppbot import *
>>> XmppBot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'XmppBot' is not defined
>>> a=XmppBot()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'XmppBot' is not defined

o

1
2
3
4
5
6
7
8
9
>>> from xmppbot import *
>>> XmppBot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'XmppBot' is not defined
>>> a=XmppBot()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'XmppBot' is not defined

¿como demonios tiene que ser el setup.py para que se instale bien?

Tambien he probado con sacar y meter el paquete de la carpeta xmppbot
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder