Skip to content

Commit accd630

Browse files
Siddhant-K-codepombredanne
authored andcommitted
Merge branch 'Siddhant-K-code:siddhant-improving-pypi'
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 467e533 commit accd630

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"type": "pypi",
3+
"namespace": null,
4+
"name": "arpy",
5+
"version": "0.1.1",
6+
"qualifiers": {},
7+
"subpath": null,
8+
"primary_language": "Python",
9+
"description": "Library for accessing \"ar\" files",
10+
"release_date": null,
11+
"parties": [
12+
{
13+
"type": "person",
14+
"role": "author",
15+
"name": "Stanis\u0142aw Pitucha",
16+
"email": "[email protected]",
17+
"url": "http://bitbucket.org/viraptor/arpy"
18+
}
19+
],
20+
"keywords": [],
21+
"homepage_url": "http://bitbucket.org/viraptor/arpy",
22+
"download_url": null,
23+
"size": null,
24+
"sha1": null,
25+
"md5": null,
26+
"sha256": null,
27+
"sha512": null,
28+
"bug_tracking_url": null,
29+
"code_view_url": null,
30+
"vcs_url": null,
31+
"copyright": null,
32+
"license_expression": "bsd-simplified",
33+
"declared_license": {
34+
"license": "Simplified BSD",
35+
"classifiers": []
36+
},
37+
"notice_text": null,
38+
"root_path": null,
39+
"dependencies": [],
40+
"contains_source_code": null,
41+
"source_packages": [],
42+
"purl": "pkg:pypi/[email protected]",
43+
"repository_homepage_url": "https://pypi.org/project/arpy",
44+
"repository_download_url": "https://pypi.io/packages/source/a/arpy/arpy-0.1.1.tar.gz",
45+
"api_data_url": "http://pypi.python.org/pypi/arpy/0.1.1/json"
46+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
from distutils.core import setup
5+
6+
setup(name='arpy',
7+
version='0.1.1',
8+
description='Library for accessing "ar" files',
9+
author=u'Stanisław Pitucha',
10+
author_email='[email protected]',
11+
url='http://bitbucket.org/viraptor/arpy',
12+
py_modules=['arpy'],
13+
license="Simplified BSD",
14+
)
15+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from setuptools import setup
2+
3+
setup(
4+
version="1.0.0",
5+
description="A sample package",
6+
author="Test",
7+
author_email="[email protected]",
8+
package_requires=[])

tests/packagedcode/test_pypi.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,19 @@ def test_parse_metadata_unpacked_sdist_metadata_v10_subdir(self):
172172
expected_loc = self.get_test_loc('pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-subdir-expected.json')
173173
self.check_package(package, expected_loc, regen=False)
174174

175+
def test_parse_setup_py_with_name(self):
176+
test_file = self.get_test_loc('pypi/setup.py/with_name.py')
177+
packages = pypi.parse_setup_py(test_file)
178+
expected_loc = self.get_test_loc('pypi/setup.py/with_name.py.expected')
179+
self.check_packages(packages, expected_loc, regen=False)
180+
181+
def test_parse_setup_py_without_name(self):
182+
test_file = self.get_test_loc('pypi/setup.py/without_name.py')
183+
try:
184+
pypi.parse_setup_py(test_file)
185+
except AttributeError as e:
186+
assert "'NoneType' object has no attribute 'to_dict'" in str(e)
187+
175188
def test_parse_metadata_unpacked_sdist_metadata_v11_1(self):
176189
test_file = self.get_test_loc('pypi/unpacked_sdist/metadata-1.1/python-mimeparse-1.6.0/PKG-INFO')
177190
package = pypi.parse_metadata(test_file)

0 commit comments

Comments
 (0)