Code Monkey home page Code Monkey logo

Comments (7)

fiorix avatar fiorix commented on July 28, 2024

On 2012-09-18, at 8:19 AM, Alexandr Emelin [email protected] wrote:

Greetings, Alexandre!

Thank you very much for cyclone! It is really cool!

thanks!

But i have a trouble and a note:)

[Trouble] Making cyclone-sse project (https://github.com/FZambia/cyclone-sse) i came across a problem - can not install cyclone on CentOS 5. This is because their is no OpenSSL 0.9.8f distribution. Here detail description http://stackoverflow.com/questions/7340784/easy-install-pyopenssl-error
In my project i avoided this problem by adding OS version check in setup.py and using pyopenssl==0.12 in case of Centos 5.

try:

to avoid installation problems on centos 5

which has no distributions for OpenSSL 0.9.8f

from distutils.version import StrictVersion
import platform
os, version, _type = platform.linux_distribution()
if os == "CentOS" and StrictVersion(version) < StrictVersion('6.0'):
requires.insert(0, "pyopenssl==0.12")
except:
pass

i guess it requires a patch in cyclone's setup.py to support centos 5
currently, i have no centos (and time :p) to test, thus, i appreciate if you can make the change and send a pull request

But standalone cyclone still can not be installed

i believe the above would fix it as well

[Note] While installing i got following warning:
package init file 'twisted/plugins/init.py' not found (or not a regular file)
*** Failed to update Twisted plugin cache. ***

this might be because twisted is not installed, or is installed in a different location (most likely)
does it show "cyclone" in the list of commands when you run twistd?

Thanks for your time!


Reply to this email directly or view it on GitHub.

  • af

from cyclone.

FZambia avatar FZambia commented on July 28, 2024

just found this SO post: http://stackoverflow.com/a/7525163
According to it:

Related: keep in mind that in your project, you must not have a file twisted/plugins/init.py. If you see this warning during installation:

package init file 'twisted/plugins/__init__.py' not found (or not a regular file)

it is completely normal and you should not try to fix it by adding an init.py.

So i think there is probably nothing wrong with this warning.

I'll try to make a setup.py patch for centos 5 as soon as i find some time! Thanks!

from cyclone.

FZambia avatar FZambia commented on July 28, 2024
import sys
import platform
from distutils import log
from distutils.core import setup
from distutils.version import StrictVersion


requires = ["twisted"] 


pyopenssl = "pyopenssl"
# avoiding installation problems on old RedHat distributions (ex. CentOS 5)
# http://stackoverflow.com/questions/7340784/easy-install-pyopenssl-error
py_version = platform.python_version()
if StrictVersion(py_version) < StrictVersion('2.6'):
    distname, version, _id = platform.dist()
else:
    distname, version, _id = platform.linux_distribution()
is_redhat = distname in ["CentOS", "redhat"]
if is_redhat and version and StrictVersion(version) < StrictVersion('6.0'):
    pyopenssl = "pyopenssl==0.12"

requires.append(pyopenssl)


# PyPy and setuptools don't get along too well, yet.
if sys.subversion[0].lower().startswith('pypy'):
    from distutils.core import setup
    extra = dict(requires=requires)
else:
    from setuptools import setup
    extra = dict(install_requires=requires)


setup(
    name="cyclone",
    version="1.0-rc12",
    author="fiorix",
    author_email="[email protected]",
    url="http://cyclone.io/",
    license="http://www.apache.org/licenses/LICENSE-2.0",
    description="Non-blocking web server. "
                "A facebook's Tornado on top of Twisted.",
    keywords="python non-blocking web server twisted facebook tornado",
    packages=["cyclone", "twisted.plugins"],
    package_data={"cyclone": ["appskel.zip"],
                  "twisted": ["plugins/cyclone_plugin.py"]},
    **extra
)

try:
    from twisted.plugin import IPlugin, getPlugins
    list(getPlugins(IPlugin))
except:
    log.warn("*** Failed to update Twisted plugin cache. ***")

With such setup.py cyclone can be successfully installed on CentOS 5, but I can not check how SSL parts of cyclone work when 0.12 version of pyopenssl installed. Anyway i think this is much better than nothing.

from cyclone.

fiorix avatar fiorix commented on July 28, 2024

pull request accepted... let's see how it goes
thank you

from cyclone.

FZambia avatar FZambia commented on July 28, 2024

thank you again for cyclone!:) we intensively use it in production and it really shines!

from cyclone.

fiorix avatar fiorix commented on July 28, 2024

no worries.. good to know
btw, where is it used, and for what? feel free to email me directly if you can't publicly disclose :)

from cyclone.

FZambia avatar FZambia commented on July 28, 2024

sent an email:)

from cyclone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.