Giter Club home page Giter Club logo

Comments (3)

hoefling avatar hoefling commented on August 16, 2024

Take a look at gs-pypi-generate-db. After db is generated, create a git repo in db dir and adapt /etc/g-sorcery/gs-pypi.json to include your custom db:

"repositories": {
    "pypi": {
      "repo_uri": "https://pypi.python.org/",
      "sync_method": "git",
      "db_uri": "file:///path/to/db",
      "branch": "master"
    }
  }
...

from gs-pypi.

heroxbd avatar heroxbd commented on August 16, 2024

Related bug report: https://bugs.gentoo.org/607666

from gs-pypi.

weedy avatar weedy commented on August 16, 2024

Is this even possible anymore?

# gs-pypi-generate-db test
--2018-08-13 17:20:26--  https://pypi.python.org/pypi?%3Aaction=index
Resolving pypi.python.org... 151.101.124.223, 2a04:4e42:1e::223
Connecting to pypi.python.org|151.101.124.223|:443... connected.
HTTP request sent, awaiting response... 301 Redirect to Primary Domain
Location: https://pypi.org/pypi?%3Aaction=index [following]
--2018-08-13 17:20:26--  https://pypi.org/pypi?%3Aaction=index
Resolving pypi.org... 151.101.64.223, 151.101.192.223, 151.101.128.223, ...
Connecting to pypi.org|151.101.64.223|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://pypi.org/pypi/?%3Aaction=index [following]
--2018-08-13 17:20:26--  https://pypi.org/pypi/?%3Aaction=index
Reusing existing connection to pypi.org:443.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://pypi.org/ [following]
--2018-08-13 17:20:26--  https://pypi.org/
Reusing existing connection to pypi.org:443.
HTTP request sent, awaiting response... 200 OK
Length: 17271 (17K) [text/html]
Saving to: ‘/tmp/tmp0zlfwza7/packages’

/tmp/tmp0zlfwza7/packages           100%[=================================================================>]  16.87K  --.-KB/s    in 0.02s   

2018-08-13 17:20:26 (1.04 MB/s) - ‘/tmp/tmp0zlfwza7/packages’ saved [17271/17271]

/usr/lib64/python3.5/site-packages/bs4/__init__.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 18 of the file /usr/lib/python-exec/python3.5/gs-pypi-generate-db. To get rid of this warning, change code that looks like this:

 BeautifulSoup(YOUR_MARKUP})

to this:

 BeautifulSoup(YOUR_MARKUP, "lxml")

  markup_type=markup_type))
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.5/gs-pypi-generate-db", line 18, in <module>
    sys.exit(gs_pypi_generate_db.main())
  File "/usr/lib64/python3.5/site-packages/gs_pypi/gs_pypi_generate_db.py", line 68, in main
    common_config=config["common_config"])
  File "/usr/lib64/python3.5/site-packages/g_sorcery/package_db.py", line 563, in __call__
    self.generate_tree(pkg_db, common_config, config)
  File "/usr/lib64/python3.5/site-packages/g_sorcery/package_db.py", line 577, in generate_tree
    data = self.download_data(common_config, config)
  File "/usr/lib64/python3.5/site-packages/g_sorcery/package_db.py", line 595, in download_data
    self.process_uri(uri, data)
  File "/usr/lib64/python3.5/site-packages/g_sorcery/package_db.py", line 606, in process_uri
    data.update(load_remote_file(**uri))
  File "/usr/lib64/python3.5/site-packages/g_sorcery/fileutils.py", line 301, in load_remote_file
    open_file=open_file, open_mode=open_mode))
  File "/usr/lib64/python3.5/site-packages/g_sorcery/fileutils.py", line 258, in _call_parser
    data = parser(f)
  File "/usr/lib64/python3.5/site-packages/gs_pypi/pypi_db.py", line 62, in parse_data
    for entry in packages.find_all("tr")[1:last]:
AttributeError: 'NoneType' object has no attribute 'find_all'

from gs-pypi.

Related Issues (16)

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.