Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7712975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:45:25+00:00 2026-06-01T01:45:25+00:00

I wrote a package that has dependency in keyring. Everything is installed fine with

  • 0

I wrote a package that has dependency in keyring.

Everything is installed fine with Python 2.7 until I test Python 2.4

Here is my setup.py

from setuptools import setup, find_packages

setup(
    name="blah",
    version='0.9dev',
    description="blah",
    package_dir = {'': 'src'},
    packages=find_packages('src'),
    include_package_data=True,
    zip_safe=False,
    install_requires=[
        'setuptools',
        'keyring',
        'argparse',
        'Cheetah'
    ],
    entry_points = """
    [console_scripts]
    A = A:main
    """,
)

I keep getting syntax error.
UPDATE: here is what i see when i try to install the package

Getting distribution for 'keyring'.
warning: no previously-included files found matching '.hg/last-message.txt'
  File "build/bdist.linux-x86_64/egg/keyring/tests/test_backend.py", line 65
    yield
         ^
SyntaxError: invalid syntax
  File "build/bdist.linux-x86_64/egg/keyring/tests/test_core.py", line 127
    with open(self.legacy_location, 'w') as f:
            ^
SyntaxError: invalid syntax
  File "build/bdist.linux-x86_64/egg/keyring/util/escape.py", line 21
    return c if c in LEGAL_CHARS else ESCAPE_FMT % ord(c)
              ^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents...
keyring.core: module references __path__
keyring.tests.test_cli: module references __file__
  File "/home/bpm/Downloads/qc_processor/eggs/tmp4sN15a/keyring-0.8.1-py2.4.egg/keyring/tests/test_backend.py", line 65
    yield
         ^
SyntaxError: invalid syntax
  File "/home/bpm/Downloads/qc_processor/eggs/tmp4sN15a/keyring-0.8.1-py2.4.egg/keyring/tests/test_core.py", line 127
    with open(self.legacy_location, 'w') as f:
            ^
SyntaxError: invalid syntax
  File "/home/bpm/Downloads/qc_processor/eggs/tmp4sN15a/keyring-0.8.1-py2.4.egg/keyring/util/escape.py", line 21
    return c if c in LEGAL_CHARS else ESCAPE_FMT % ord(c)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:45:26+00:00Added an answer on June 1, 2026 at 1:45 am

    The errors are due to using features that were added to Python after version 2.4, like the with statement and conditional expressions. See, for instance, the What’s New document for Python 2.5.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am completely new to python but I found a package that I need
Before proceeding further, here are some details of my Mac and the installed python
I have installed OpenCV C libraries from package management into my Kubuntu 9.10. I
I wrote an AppWidget that has a configuration activity(I used the same configuration activity
I'm trying to write a python script that packages our software. This script needs
I wrote a little monkeypatch to the Rails MySQLAdapter and want to package it
I recently wrote a script which queries PyPI and downloads a package; however, the
I am doing astrophysical research. I wrote a package containing the classes Star, Band,
I wrote a program that is based completely on a single text file: I
In Liferay 6.1 The class ServletResponseUtil has been moved to a different package than

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.