unixsurfer / haproxyadmin

A python library to interact with HAProxy over UNIX socket
Apache License 2.0
113 stars 31 forks source link

New Release #11

Closed LukeSheard closed 5 years ago

LukeSheard commented 6 years ago

Are the 2 years of changes for this project going to be released on to PyPi. Or this project as is and needs to be cloned from master?

unixsurfer commented 6 years ago

I guess I have to make a release before I merge some new stuff. Thanks for the reminder.

peterfroehlich commented 6 years ago

Just another nudge to do a release. The version on pip doesn't support ".setaddress", which is soooooo useful ^___^

singh-abhijeet commented 5 years ago

Since the pip package is not latest, tried to clone and install using python setup.py install, but it throws an Exception:

ERROR:root:Error parsing
...
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name haproxyadmin was given, but was not able to be found.
error in setup command: Error parsing /home/abhijeet/Downloads/haproxyadmin-master/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name haproxyadmin was given, but was not able to be found.

Seems like it is unable to parse setup.cfg, how to circumvent this?

unixsurfer commented 5 years ago

Since the pip package is not latest, tried to clone and install using python setup.py install, but it throws an Exception:

ERROR:root:Error parsing
...
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name haproxyadmin was given, but was not able to be found.
error in setup command: Error parsing /home/abhijeet/Downloads/haproxyadmin-master/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name haproxyadmin was given, but was not able to be found.

Seems like it is unable to parse setup.cfg, how to circumvent this?

Just created a python37 environment and I was able to run python setup.py install without problems, see bellow . Can you please share some info of your envinronment(python version, pip,

(python_37) foouser at barhost in /tmp/haproxyadmin on (master u=)
python setup.py install
running install
[pbr] Writing ChangeLog
[pbr] Generating ChangeLog
[pbr] ChangeLog complete (0.0s)
[pbr] Generating AUTHORS
[pbr] AUTHORS complete (0.0s)
running build
running build_py
creating build
creating build/lib
creating build/lib/haproxyadmin
copying haproxyadmin/exceptions.py -> build/lib/haproxyadmin
copying haproxyadmin/haproxy.py -> build/lib/haproxyadmin
copying haproxyadmin/__init__.py -> build/lib/haproxyadmin
copying haproxyadmin/frontend.py -> build/lib/haproxyadmin
copying haproxyadmin/internal.py -> build/lib/haproxyadmin
copying haproxyadmin/utils.py -> build/lib/haproxyadmin
copying haproxyadmin/command_status.py -> build/lib/haproxyadmin
copying haproxyadmin/backend.py -> build/lib/haproxyadmin
copying haproxyadmin/server.py -> build/lib/haproxyadmin
running egg_info
creating haproxyadmin.egg-info
writing pbr to haproxyadmin.egg-info/pbr.json
writing haproxyadmin.egg-info/PKG-INFO
writing dependency_links to haproxyadmin.egg-info/dependency_links.txt
writing requirements to haproxyadmin.egg-info/requires.txt
writing top-level names to haproxyadmin.egg-info/top_level.txt
[pbr] Processing SOURCES.txt
writing manifest file 'haproxyadmin.egg-info/SOURCES.txt'
[pbr] In git context, generating filelist from git
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'haproxyadmin.egg-info/SOURCES.txt'
running install_lib
creating /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
copying build/lib/haproxyadmin/exceptions.py -> /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
copying build/lib/haproxyadmin/haproxy.py -> /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
copying build/lib/haproxyadmin/__init__.py -> /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
copying build/lib/haproxyadmin/frontend.py -> /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
copying build/lib/haproxyadmin/internal.py -> /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
copying build/lib/haproxyadmin/utils.py -> /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
copying build/lib/haproxyadmin/command_status.py -> /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
copying build/lib/haproxyadmin/backend.py -> /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
copying build/lib/haproxyadmin/server.py -> /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin
byte-compiling /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin/exceptions.py to exceptions.cpython-37.pyc
byte-compiling /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin/haproxy.py to haproxy.cpython-37.pyc
byte-compiling /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin/__init__.py to __init__.cpython-37.pyc
byte-compiling /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin/frontend.py to frontend.cpython-37.pyc
byte-compiling /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin/internal.py to internal.cpython-37.pyc
byte-compiling /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin/utils.py to utils.cpython-37.pyc
byte-compiling /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin/command_status.py to command_status.cpython-37.pyc
byte-compiling /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin/backend.py to backend.cpython-37.pyc
byte-compiling /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin/server.py to server.cpython-37.pyc
running install_egg_info
Copying haproxyadmin.egg-info to /home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/haproxyadmin-0.2.2.dev7-py3.7.egg-info
running install_scripts
/tmp/haproxyadmin/.eggs/pbr-5.1.1-py3.7.egg/pbr/packaging.py:409: EasyInstallDeprecationWarning: Use get_header
  header = easy_install.get_script_header("", executable, is_wininst)
(python_37) foouser at barhost in /tmp/haproxyadmin on (master * u=)
ipython
/home/foouser/.virtualenvs/python_37/lib/python3.7/site-packages/IPython/core/history.py:226: UserWarning: IPython History requires SQLite, your history will not be saved
  warn("IPython History requires SQLite, your history will not be saved")
Python 3.7.1 (default, Oct 23 2018, 09:57:50) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.1.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from haproxyadmin import haproxy                                                                                                                                                                                                       

In [2]:                                                                                                                                                                                                                                        
Do you really want to exit ([y]/n)? y

(python_37) foouser at barhost in /tmp/haproxyadmin on (master * u=) *1
pip list|grep -E 'setup|pip'
pip                18.1      
setuptools         40.6.2    
choco commented 5 years ago

Any plans for a new release? As @peterfroehlich the additional methods in Server are super useful.

kadasz commented 5 years ago

+1 Is it possible to release a new version on PyPi? A new feature such as ".setaddress" and package installation in Python 3.6 (3.7) environment are desired changes.

unixsurfer commented 5 years ago

0.2.2 version is out