Skip to content

Commit 2180a03

Browse files
committed
Fix PyPi dist
1 parent 4b37729 commit 2180a03

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ matrix:
66
- os: linux
77
python: 2.7
88
env:
9-
- TOXENV=flake8,docs,spell
9+
- TOXENV=flake8,twine,docs,spell
1010

1111
# Run as a regular user
1212
- os: linux

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<p align="center">
2-
<img src="doc/scapy_logo.png" width=200>
2+
<img src="doc/scapy_logo.png" width=200>
33
</p>
44

55
# Scapy
66

77
[![Travis Build Status](https://travis-ci.org/secdev/scapy.svg?branch=master)](https://travis-ci.org/secdev/scapy)
88
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/secdev/scapy?svg=true)](https://ci.appveyor.com/project/secdev/scapy)
99
[![Codecov Status](https://codecov.io/gh/secdev/scapy/branch/master/graph/badge.svg)](https://codecov.io/gh/secdev/scapy)
10-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/30ee6772bb264a689a2604f5cdb0437b)](https://www.codacy.com/app/secdev/scapy?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=secdev/scapy&amp;utm_campaign=Badge_Grade)
10+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/30ee6772bb264a689a2604f5cdb0437b)](https://www.codacy.com/app/secdev/scapy?utm_source=github.com&utm_medium=referral&utm_content=secdev/scapy&utm_campaign=Badge_Grade)
1111
[![PyPI Version](https://img.shields.io/pypi/v/scapy.svg)](https://pypi.python.org/pypi/scapy/)
1212
[![Python Versions](https://img.shields.io/pypi/pyversions/scapy.svg)](https://pypi.python.org/pypi/scapy/)
1313
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](LICENSE)
@@ -57,13 +57,12 @@ Received 2 packets, got 1 answers, remaining 0 packets
5757
### Python module
5858

5959
It is straightforward to use Scapy as a regular Python module, for example to
60-
check if a TCP port is opened. First, save the following code in a file names
61-
`send_tcp_syn.py`
60+
check if a TCP port is opened.
61+
First, save the following code in a file names e.g. `send_tcp_syn.py`
6262

6363
```python
6464
from scapy.all import *
6565
conf.verb = 0
66-
6766
p = IP(dst="github.com")/TCP()
6867
r = sr1(p)
6968
print(r.summary())

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66

77

88
from distutils import archive_util
9-
from distutils import sysconfig
10-
from distutils.core import setup
11-
from distutils.command.sdist import sdist
9+
try:
10+
from setuptools import setup
11+
except ImportError:
12+
from distutils.core import setup
1213
import io
1314
import os
1415

tox.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ deps = codespell
9797
# inet6, dhcp6 and the ipynb files contains french: ignore them
9898
commands = codespell --ignore-words=.travis/codespell_ignore.txt --skip="*.pyc,*.png,*.raw,*.pdf,*.pcap,*.js,*.html,*.der,*_build*,*inet6.py,*dhcp6.py,*.ipynb" scapy/ doc/ test/ .github/
9999

100+
[testenv:twine]
101+
description = "Check Scapy code distribution"
102+
skip_install = true
103+
deps = twine
104+
setuptools>=38.6.0
105+
cmarkgfm
106+
commands = python setup.py sdist
107+
twine check dist/*
108+
100109
[testenv:flake8]
101110
description = "Check Scapy code style & quality"
102111
skip_install = true

0 commit comments

Comments
 (0)